This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ErrorInfo = | |
| Unauthorized | |
| InternalServerError | |
type SendValue<'T> = | |
| Uninitialized | |
| Initial of 'T | |
| Sending of 'T | |
| Sent of 'T | |
| SendFailed of 'T * ErrorInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ErrorInfo = HttpResponseStatusCode of int | |
type ReceiveValue<'T> = | |
| Available of 'T | |
| Unavailable | |
| ReceiveFailed of ErrorInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let (chargingPermission: ReceiveValue<ChargingPermission>) = Unavailable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<ReactComponent>] | |
static member RadioInputReceiveOnly | |
(inputValue: ChargingPermission) | |
(chargingPermission: ReceiveValue<ChargingPermission>) | |
= | |
let inputValueStr = $"%A{inputValue}" | |
Html.div [ | |
prop.classes [ "flex"; "gap-2" ] | |
prop.children [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I __SOURCE_DIRECTORY__ | |
#r @"bin/Debug/EvalWrapper.dll" | |
open Microsoft.MSR.CNTK.Extensibility.Managed | |
open System.Drawing | |
open System.Collections.Generic | |
open System | |
let createModel modelPath = | |
let model = new IEvaluateModelManagedF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volatile unsigned char * adValue = (unsigned char *) 0xFFB00000; | |
void battVoltStatemachine() { | |
unsigned char battVolt = *adValue; | |
if (battVolt < 10) { | |
// change state | |
} | |
} |