Poseidon2
– Family manual
HW group
www.HW-group.com
70 / 104
EX104: XML file downloader XML A
An example to demonstrate UDP search for devices,
reading their basic network parameters, and
downloading and parsing the XML file with sensor and
binary input states. Values can be downloaded from
one device only at a time
. Written in Borland C++
Builder using the HWg SDK.
Functions used:
hwudps_init, hwudps_uninit,
hwudps_reinit, hwudps_search,
hwudps_search_finish, hwudps_count,
hwudps_record, hwxml_init, hwxml_uninit,
hwxml_open, hwxml_close, hwxml_get_values,
hwxml_get_values_cache, hwxml_finish
Demonstrated features
UDP broadcast search for devices
Displaying discovered devices and selecting five of them
Downloading the XML file with readings via the HTTP protocol and parsing it
Storing all values from a device into a table
Downloading the readings manually or automatically every XX seconds
All errors are logged to the log window
EX105: XML file downloader XML B
An application to demonstrate UDP search for devices, reading basic network parameters,
and downloading and parsing the XML file with sensor and binary input states. Readings can
be downloaded
from up to five devices
at a time. Written in Borland C++ Builder using the
HWg SDK.
Functions used:
hwudps_init, hwudps_uninit, hwudps_reinit, hwudps_search,
hwudps_search_finish, hwudps_count, hwudps_record, hwxml_init, hwxml_uninit,
hwxml_open, hwxml_close, hwxml_get_values,
hwxml_get_values_cache_many, hwxml_count_modules, hwxml_finish
EX106: SNMP traps receiver
An application to demonstrate UDP search for
devices, reading basic network parameters, and
downloading and parsing the XML file with
sensor and binary input states. Readings can be
downloaded from up to five devices at a time.
Written in Borland C++ Builder using the HWg
SDK.
Functions used:
hwxml_init, hwxml_uninit,
hwxml_open, hwxml_close,
hwxml_get_values, hwxml_get_values_cache,
hwxml_finish, hwxml_error, hwsnmp_init,
hwsnmp_uninit, hwsnmp_trap_recv_create,
hwsnmp_trap_recv_create_finish,
hwsnmp_clr_traps_callback,
hwsnmp_traps2callback