|
|
||||||
|
Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Types |
Protected Member Functions |
Protected Attributes |
List of all members
faudes::xDevice Class Reference 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
Iterator for const access to individual devices. Definition at line 58 of file iop_xdevice.h. ◆ iterator
Definition at line 278 of file iop_xdevice.h. Constructor & Destructor Documentation◆ xDevice()
Default constructor. Definition at line 44 of file iop_xdevice.cpp. ◆ ~xDevice()
Explicit destructor. Definition at line 80 of file iop_xdevice.cpp. Member Function Documentation◆ Begin() [1/2]
Return first Device. Definition at line 314 of file iop_xdevice.h. ◆ Begin() [2/2]
Set Iterator to first device.
Definition at line 114 of file iop_xdevice.h. ◆ Clear()
Clear all configuarations and destroy existing devices. Reimplemented from faudes::vDevice. Definition at line 197 of file iop_xdevice.cpp. ◆ Compile()
Build up internal data structures. I.e. (event-idx,int) - map Reimplemented from faudes::vDevice. Definition at line 247 of file iop_xdevice.cpp. ◆ Configure() [1/2]
An xDevice does not provide event based configuration. Use Insert instead. This function will throw an execption Reimplemented from faudes::vDevice. Definition at line 307 of file iop_xdevice.cpp. ◆ Configure() [2/2]
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 296 of file iop_xdevice.cpp. ◆ CurrentTime() [1/2]
Set physical time in ftu.
Reimplemented from faudes::vDevice. Definition at line 348 of file iop_xdevice.cpp. ◆ CurrentTime() [2/2]
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 319 of file iop_xdevice.cpp. ◆ CurrentTimeMs() [1/2]
Set physical time in ms.
Reimplemented from faudes::vDevice. Definition at line 356 of file iop_xdevice.cpp. ◆ CurrentTimeMs() [2/2]
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 334 of file iop_xdevice.cpp. ◆ DoReadConfiguration()
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 403 of file iop_xdevice.cpp. ◆ DoWriteConfiguration()
Write the device patrameters to a TokenWriter.
Reimplemented from faudes::vDevice. Definition at line 365 of file iop_xdevice.cpp. ◆ End() [1/2]
Return last Device. Definition at line 317 of file iop_xdevice.h. ◆ End() [2/2]
Set Iterator to last device.
Definition at line 122 of file iop_xdevice.h. ◆ FlushOutputs()
Flush any pending IO Operations. Pass on flush output buffers to participating devices. Reimplemented from faudes::vDevice. Definition at line 461 of file iop_xdevice.cpp. ◆ FromFile()
Construct on heap from file. This constructor examines the file, determines the coressponding class and constructs the device on the heap.
Definition at line 101 of file iop_xdevice.cpp. ◆ FromTokenReader()
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.
Definition at line 90 of file iop_xdevice.cpp. ◆ Insert() [1/2]
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 234 of file iop_xdevice.cpp. ◆ Insert() [2/2]
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 218 of file iop_xdevice.cpp. ◆ Reset()
reset all dynamic state, i.e. call reset on each device Reimplemented from faudes::vDevice. Definition at line 183 of file iop_xdevice.cpp. ◆ ResetRequest()
Test for reset request. Reimplemented from faudes::vDevice. Definition at line 393 of file iop_xdevice.cpp. ◆ Size()
Get number of devices. Definition at line 128 of file iop_xdevice.h. ◆ Start()
Activate the devices. This function enables output execution and input reading.
Reimplemented from faudes::vDevice. Definition at line 153 of file iop_xdevice.cpp. ◆ Status()
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 111 of file iop_xdevice.cpp. ◆ Stop()
Deactivate the device. This function disables output execution and input reading. Reimplemented from faudes::vDevice. Definition at line 168 of file iop_xdevice.cpp. ◆ WriteOutput()
Run output command on relevant device.
Implements faudes::vDevice. Definition at line 451 of file iop_xdevice.cpp. Member Data Documentation◆ lastCommandWasStart
Current device state: remember last stop/down command. Definition at line 332 of file iop_xdevice.h. ◆ mDeviceNames
Vector of member-device-names. Definition at line 323 of file iop_xdevice.h. ◆ mDevices
Vector of member-devices. Definition at line 320 of file iop_xdevice.h. ◆ mInputToDevice
Compiled data: Input map to map input idx to device no. Definition at line 326 of file iop_xdevice.h. ◆ mOutputToDevice
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.32b --- 2024.03.01 --- c++ api documentaion by doxygen |