ADVANCED: mbusReceive (Function) |
Top Previous Next |
This function is used to receive raw M-Bus frames. For M-Bus, the frame must be requested using mbusDataRequest or mbusSend, and this function will block for a moment while it tries to read the response. Wireless M-Bus devices may automatically send the frames and the timeout parameter can be used to determine how long this function should wait for a response. The filter parameter can be used to only receive frames from a specific wireless M-Bus device.
Input: handle : SYSHANDLE A handle to the connection
frame : PTR The buffer to store the frame in.
maxsize : INT The size of the buffer in bytes.
filter : STRING For Wireless M-Bus only: Specifies the address or address filter to receive frames from.
timeout : INT Default 0 Number of seconds to wait for a Wireless M-Bus frame. Use 0 seconds to return immediately if there is no data in the buffer.
Output: size : INT The number of bytes received.
Returns: INT
Declaration: FUNCTION mbusReceive : INT;
Example: // Dump all received frames from ELS meters, to e.g. help with debugging. |