Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Types |
Protected Member Functions |
Protected Attributes |
List of all members
faudes::xDevice Class Reference Container of devices. More...
Detailed DescriptionContainer of devices. The xDevices is a container of vDevices. Input readings are combined in a union fashion over all participating devices, output writings are dispatched to the relevant device. Formally, the xDevice class is derived from the vDevice class to provide the same interaface to a simulator. Ie, the application does not need to know whether is acts on a single vDevice or an xDevice. This is also true for configuration from file, but of cause not for programatical configuration. An xDevice may not be configured to have individual outputs or inputs, but to hold particular vDevices. Technical detail: the xDevice uses the vDevice interface to register a common event fifo buffer and a common condition variable. Thus, the xDevice only works with devices that support this configuration feature. Definition at line 49 of file iop_xdevice.h. Member Typedef Documentation
Iterator for const access to individual devices. Definition at line 58 of file iop_xdevice.h.
Definition at line 278 of file iop_xdevice.h. Constructor & Destructor Documentation
Default constructor. Definition at line 45 of file iop_xdevice.cpp.
Explicit destructor. Definition at line 81 of file iop_xdevice.cpp. Member Function Documentation
Set Iterator to first device.
Definition at line 114 of file iop_xdevice.h.
Return first Device. Definition at line 314 of file iop_xdevice.h.
Clear all configuarations and destroy existing devices. Reimplemented from faudes::vDevice. Definition at line 198 of file iop_xdevice.cpp.
Build up internal data structures. I.e. (event-idx,int) - map Reimplemented from faudes::vDevice. Definition at line 248 of file iop_xdevice.cpp.
Dummy. An xDevice does not provide event based configuration. Use Insert instead. This function will throw an execption Reimplemented from faudes::vDevice. Definition at line 297 of file iop_xdevice.cpp.
An xDevice does not provide event based configuration. Use Insert instead. This function will throw an execption Reimplemented from faudes::vDevice. Definition at line 308 of file iop_xdevice.cpp.
Report global fauDES-time Note: per convention we take the time of the first device inserted in xDevice as global time.
Reimplemented from faudes::vDevice. Definition at line 320 of file iop_xdevice.cpp.
Set physical time in ftu.
Reimplemented from faudes::vDevice. Definition at line 349 of file iop_xdevice.cpp.
Report global fauDES-time Note: per convention we take the time of the first device inserted in xDevice as global time.
Reimplemented from faudes::vDevice. Definition at line 335 of file iop_xdevice.cpp.
Set physical time in ms.
Reimplemented from faudes::vDevice. Definition at line 357 of file iop_xdevice.cpp.
Actual method to read device configuration from tokenreader. DoRead basically calls the DoWrite-function of all devices which are part of xDevice
Reimplemented from faudes::vDevice. Definition at line 404 of file iop_xdevice.cpp.
Write the device patrameters to a TokenWriter.
Reimplemented from faudes::vDevice. Definition at line 366 of file iop_xdevice.cpp.
Set Iterator to last device.
Definition at line 122 of file iop_xdevice.h.
Return last Device. Definition at line 317 of file iop_xdevice.h.
Flush any pending IO Operations. Pass on flush output buffers to participating devices. Reimplemented from faudes::vDevice. Definition at line 462 of file iop_xdevice.cpp.
Construct on heap from file. This constructor examines the file, determines the coressponding class and constructs the device on the heap.
Reimplemented from faudes::vDevice. Definition at line 102 of file iop_xdevice.cpp.
Construct on heap from token reader. This constructor examines the token strean, determines the coressponding class and constructs the device on the heap. Todo: the implementation of this function is a hack, there must be proper solution to this issue.
Reimplemented from faudes::vDevice. Definition at line 91 of file iop_xdevice.cpp.
Insert a new device. An xDevice is configured by inserting vDevices. An xDevice cannot be configured by individual output/sensro events. Note: by inserting a device into an xdevice its ownership will be assumed by the xdevice and therewith the right to destoy it.
Definition at line 219 of file iop_xdevice.cpp.
Insert a new device by Filename. An xDevice is configured by inserting vDevices. An xDevice cannot be configured by individual output/sensro events. Note: by inserting a device into an xdevice its ownership will be assumed by the xdevice and therewith the right to destoy For information on how to write such a file see the "iodevice" - tutorial
Definition at line 235 of file iop_xdevice.cpp.
reset all dynamic state, i.e. call reset on each device Reimplemented from faudes::vDevice. Definition at line 184 of file iop_xdevice.cpp.
Test for reset request. Reimplemented from faudes::vDevice. Definition at line 394 of file iop_xdevice.cpp.
Get number of devices. Definition at line 128 of file iop_xdevice.h.
Activate the devices. This function enables output execution and input reading.
Reimplemented from faudes::vDevice. Definition at line 154 of file iop_xdevice.cpp.
Get status. This function returns the current status of the device. In derived classes that use background threads for input reading etc, a device may change its status without notice. Dont forget to reimplement this method with an appropriate mutex. Reimplemented from faudes::vDevice. Definition at line 112 of file iop_xdevice.cpp.
Deactivate the device. This function disables output execution and input reading. Reimplemented from faudes::vDevice. Definition at line 169 of file iop_xdevice.cpp.
Run output command on relevant device.
Implements faudes::vDevice. Definition at line 452 of file iop_xdevice.cpp. Member Data Documentation
Current device state: remember last stop/down command. Definition at line 332 of file iop_xdevice.h.
Vector of member-device-names. Definition at line 323 of file iop_xdevice.h.
Vector of member-devices. Definition at line 317 of file iop_xdevice.h.
Compiled data: Input map to map input idx to device no. Definition at line 326 of file iop_xdevice.h.
Compiled data: Output Map to map input idx to device no. Definition at line 329 of file iop_xdevice.h. The documentation for this class was generated from the following files: libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen |