BACnetStack_RegisterCallbackMSTPReceiveBytes
void BACnetStack_RegisterCallbackMSTPReceiveBytes( uint16_t (*FPCallbackMSTPReceiveBytes)(const uint32_t networkPortInstance, uint8_t *buffer, const uint16_t maxLength));Registers the callback the stack calls from BACnetStack_LoopMSTP() to take the octets the RS-485 receiver has already received.
Copy every octet that is waiting into buffer, at most maxLength of them, and return how many; return 0 when none is waiting. MUST NOT BLOCK. A port is in byte mode while this, BACnetStack_RegisterCallbackMSTPSendBytes() and BACnetStack_RegisterCallbackMSTPMicroseconds() are all registered; NULL clears it and ends byte mode. See “Stack-owned MS/TP” above.
See also: CASBACnetStack::FPCallbackMSTPReceiveBytes
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
FPCallbackMSTPReceiveBytes |
in | The function pointer for the CallbackMSTPReceiveBytes function. See CASBACnetStack::FPCallbackMSTPReceiveBytes for more info. |
Callback type
Section titled “Callback type”Topic: Data link and system callbacks. Declared in CASBACnetStackDLL.h.