Skip to content

Instantly share code, notes, and snippets.

@funvill
Last active April 13, 2018 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funvill/16a3ab8c165512a19293fb95c1844b9f to your computer and use it in GitHub Desktop.
Save funvill/16a3ab8c165512a19293fb95c1844b9f to your computer and use it in GitHub Desktop.
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