Last active
April 13, 2018 22:17
-
-
Save funvill/16a3ab8c165512a19293fb95c1844b9f to your computer and use it in GitHub Desktop.
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
int main() { | |
ConnectUDP(); | |
SetupCallbacks(); | |
AddDevice(389001) ; | |
AddObject(389001, ANALOG_INPUT, 101); | |
AddObject(389001, BINARY_OUTPUT, 102); | |
AddObject(389001, MULTI_STATE_VALUE, 103); | |
... | |
for(;;) { | |
BACnetLoop(); | |
} | |
} | |
bool CallbackGetPropertyReal(uint32_t deviceInstance, uint16_t objectType, | |
uint32_t objectInstance, uint32_t propertyIdentifier, | |
float * value, bool useArrayIndex, uint32_t propertyArrayIndex) | |
{ | |
if (propertyIdentifier == PROPERTY_IDENTIFIER_PRESENT_VALUE) { | |
if (objectType == ANALOG_INPUT && objectInstance == 101) { | |
*value = 99.6; | |
return true; | |
} | |
} | |
return false; | |
} | |
void CallbackReceiveMessage(...) {...}; | |
void CallbackSendMessage(...) {...}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment