Radiocraft Wireless M-Bus extension module
1.00.00
|
These functions can be called from VPL using the MODCALL keyword. More...
Functions | |
static int32 MODDECL | mbusCallOpen (HANDLE *pCPU, void *pBase) |
Open communication interface to the module. More... | |
static int32 MODDECL | mbusCallClose (HANDLE *pCPU, void *pBase) |
Close communication interface to the module. More... | |
static int32 MODDECL | mbusCallReceive (HANDLE *pCPU, void *pBase) |
Check if any MBUS packets has been received. More... | |
static int32 MODDECL | mbusCallSend (HANDLE *pCPU, void *pBase) |
Send a MBUS message. More... | |
static int32 MODDECL | mbusCallInfo (HANDLE *pCPU, void *pBase) |
Perform a series of tests to validate communication. More... | |
static int32 MODDECL | mbusCallSetFilter (HANDLE *pCPU, void *pBase) |
Set mode. More... | |
static int32 MODDECL | mbusCallRegisterSlave (HANDLE *pCPU, void *pBase) |
Register a slave device. More... | |
These functions can be called from VPL using the MODCALL keyword.
|
static |
Close communication interface to the module.
[in] | pCPU | The handle to the system. |
[in] | pBase | Pointer to structure with function parameters. |
Definition at line 1396 of file mod_mbus.c.
References lock, mbusClose(), and mbusDebug().
Referenced by moduleInit().
|
static |
Perform a series of tests to validate communication.
Perform a series of test by reading out configuration values to validate communication to module, result is send to device output.
Prints:
Result
mbus_test:Signal quality = 0 mbus_test:RSSI = 205 (-102 dBm) mbus_test:Temperature = 32 C mbus_test:VCC = 3450mV mbus_test:MBUS_MODE = 0x01 mbus_test:DATA_INTERFACE = 0x00 mbus_test:PART_NUMBER = RC1180-MBUS3 mbus_test:HW_REV_NO = 2.00 mbus_test:FW_REV_NO = 3.15 mbus_info:SERIAL_NUMBER = 01 23 45 67 89 AB CD EF mbus_info:INSTALL_MODE = 0x02 mbus_info:RSSI_MODE = 0x01
[in] | pCPU | The handle to the system. |
[in] | pBase | pointer to VPL functions data structure |
Definition at line 1535 of file mod_mbus.c.
References lock, mbus_info(), mbusClose(), mbusDebug(), and mbusOpen().
Referenced by moduleInit().
|
static |
Open communication interface to the module.
[in] | pCPU | The handle to the system. |
[in] | pBase | Pointer to structure with function parameters. |
Definition at line 1374 of file mod_mbus.c.
References lock, mbusDebug(), mbusOpen(), mbus_open::mode, and mbus_open::rssi.
Referenced by moduleInit().
|
static |
Check if any MBUS packets has been received.
[in] | pCPU | The handle to the system. |
[in] | pBase | pointer to VPL functions data structure |
Definition at line 1417 of file mod_mbus.c.
References mbus_frame::control, mbus_start_frame::control, mbus_frame::data, mbus_receive::frame, mbus_frame::id, mbus_start_frame::id, mbus_frame::length, mbus_start_frame::length, lock, mbus_frame::manufacture, mbus_start_frame::manufacturer, mbusDebug(), mbusReceive(), mbus_frame::rssi, mbus_frame::type, mbus_start_frame::type, mbus_frame::version, and mbus_start_frame::version.
Referenced by moduleInit().
|
static |
Register a slave device.
It is stored persistently.
[in] | pCPU | The handle to the system. |
[in] | pBase | Pointer to structure with function parameters. |
Definition at line 1584 of file mod_mbus.c.
References mbus_reg_slave::id, mbus_reg_slave::idx, mbus_reg_slave::key, lock, mbus_reg_slave::manufacturer, mbus_register_slave(), mbusDebug(), mbus_reg_slave::type, and mbus_reg_slave::version.
Referenced by moduleInit().
|
static |
Send a MBUS message.
[in] | pCPU | The handle to the system. |
[in] | pBase | pointer to VPL functions data structure |
Definition at line 1457 of file mod_mbus.c.
References mbus_send::control, mbus_send::data, mbus_send::length, lock, MBUS_DATA_LENGTH, mbusDebug(), and mbusSend().
Referenced by moduleInit().
|
static |
Set mode.
[in] | pCPU | The handle to the system. |
[in] | pBase | Pointer to structure with function parameters. |
Definition at line 1562 of file mod_mbus.c.
References lock, mbus_config(), mbusDebug(), and mbus_set_filter::only_installed.
Referenced by moduleInit().