|
|
||||||
|
Classes |
Public Types |
Public Member Functions |
Protected Member Functions |
Protected Attributes |
Private Member Functions |
Private Attributes |
Friends |
List of all members
faudes::sDevice Class Referenceabstract Detailed DescriptionAn sDevice implements signal based semantics for faudes events. The class is configured by AttributeSignalEvents, which in turn consist of either a AttributeSignalInput or a AttributeSignalOutput. Thus, we set and clear output signals for output events, while edges on input signals trigger input events. Sensing edges is done by separate thread that is started by Start(). This class is still virtual in that it does not provide the code for actually reading or writing signals. See cDevice and pDevice for derived device classes that implement digital io via comedi or the parallel printer port, respectively. Definition at line 287 of file iop_sdevice.h.
Member Typedef Documentation◆ ActionDefinition at line 296 of file iop_sdevice.h. ◆ TriggerDefinition at line 295 of file iop_sdevice.h. ◆ ValueDefinition at line 297 of file iop_sdevice.h. Constructor & Destructor Documentation◆ sDevice() [1/2]
Default constructor. Definition at line 382 of file iop_sdevice.cpp. ◆ sDevice() [2/2]
copy-constructor ◆ ~sDevice()
Explicit destructor. Definition at line 408 of file iop_sdevice.cpp. Member Function Documentation◆ AppendAction()
Add an action. Note: you can only add a actions to an output event; you can only (re)-configure events while the device is down.
Definition at line 673 of file iop_sdevice.cpp. ◆ AppendTrigger()
Add a trigger condition. Note: you can only add a trigger condition to an input event; you can only (re)-configure events while the device is down.
Definition at line 652 of file iop_sdevice.cpp. ◆ Clear()
Clear all configuration. This implies Stop(). Reimplemented from faudes::vDevice. Reimplemented in faudes::mbDevice. Definition at line 573 of file iop_sdevice.cpp. ◆ ClrInputSignals()
clear all input states Definition at line 1114 of file iop_sdevice.cpp. ◆ ClrOutputSignals()
clear all output values Definition at line 1169 of file iop_sdevice.cpp. ◆ Compile()
Build up internal data-structure (e.g. signal-event - mapping) Reimplemented from faudes::vDevice. Reimplemented in faudes::mbDevice. Definition at line 587 of file iop_sdevice.cpp. ◆ CycleTime() [1/2]
Report cycle time.
Definition at line 686 of file iop_sdevice.cpp. ◆ CycleTime() [2/2]
Set cycle time.
Definition at line 693 of file iop_sdevice.cpp. ◆ DoLoopCallback()
Loop hook. This function is called once during each cycle of the backgroud thread Reimplemented in faudes::mbDevice. Definition at line 605 of file iop_sdevice.h. ◆ DoReadPreface()
Reads non-event-related configuration from TokenReader. Device date is read bottom-to-top along the class-hierarchy; see also vDevice::DoReadPreface. Note: in order to keep the inputfile-layout as simple as possible no label will be used to separate this data-section.
Reimplemented from faudes::vDevice. Reimplemented in faudes::mbDevice. Definition at line 443 of file iop_sdevice.cpp. ◆ DoReadSignal()
Sample input signal. Reimplement this function to implements actual harware access to sample an input signal. This function gets called from the periodic background thread to sense edges. It is guaranteed that the pre-hook was called befor and returned "true". The post-hook will be invoked after relevant signals have been sampled.
Implemented in faudes::mbDevice. ◆ DoReadSignalsPost()
IO Hook, inputs. The background thread calls this hook after reading input signals. You may reimplement this method to e.g. release a process image. Reimplemented in faudes::mbDevice. Definition at line 543 of file iop_sdevice.h. ◆ DoReadSignalsPre()
IO Hook, inputs. The background thread calls this hook before reading input signals. You may reimplement this method to e.g. prepare a process image.
Reimplemented in faudes::mbDevice. Definition at line 533 of file iop_sdevice.h. ◆ DoWritePreface()
Writes non-event-related configuration to TokenWriter. Device data will be written bottom-to-top along the class-hierarchy, see also vDevice::DoWritePreface. Note: in order to keep the outputfile-layout as simple as possible no label will be used to separate this data-section.
Reimplemented from faudes::vDevice. Definition at line 423 of file iop_sdevice.cpp. ◆ DoWriteSignal()
Reimplement this function in a derived class for actual harware access to set or clear an output signal. Hooks are executed appropriately. If the device is configured for synchronous write, the background task is used to write signals. Otherwise, signal values are written instantly.
Implemented in faudes::mbDevice. ◆ DoWriteSignalsPost()
IO Hook, output. This hook is invoked after writing a signal value. You may reimplement this method to e.g. assemble a process image. Reimplemented in faudes::mbDevice. Definition at line 581 of file iop_sdevice.h. ◆ DoWriteSignalsPre()
IO Hook, outputs. This hook is invoked before writing a signal value. You may reimplement this method to e.g. assemble a process image.
Reimplemented in faudes::mbDevice. Definition at line 571 of file iop_sdevice.h. ◆ InsInputEvent()
Insert event as input event. Note: you can only configure events while the device is down.
Definition at line 642 of file iop_sdevice.cpp. ◆ InsOutputEvent()
Insert event as output event. Note: you can only configure event while the device is down.
Definition at line 663 of file iop_sdevice.cpp. ◆ MaxBitAddress()
Report max bit address.
Definition at line 381 of file iop_sdevice.h. ◆ ReadSignal()
Get input signal. This function provides user level access to input signals. It executes the virtual pre and post hook methods and the virtual actual harware access to sample an input signal via DoReadSignal(int).
Definition at line 706 of file iop_sdevice.cpp. ◆ Reset()
Clear dynamic data and restart device. Reimplemented from faudes::vDevice. Definition at line 559 of file iop_sdevice.cpp. ◆ Start()
Activate the device. This function enables output execution and input reading. It starts the background thread for edge detection and input event buffer.
Reimplemented from faudes::vDevice. Reimplemented in faudes::mbDevice. Definition at line 514 of file iop_sdevice.cpp. ◆ Stop()
Deactivate the device. This function disables output execution and input reading. It stops the backhround thread and resets all output signals to 0. Reimplemented from faudes::vDevice. Reimplemented in faudes::mbDevice. Definition at line 534 of file iop_sdevice.cpp. ◆ WriteOutput()
Run output command.
Implements faudes::vDevice. Definition at line 1053 of file iop_sdevice.cpp. ◆ WriteSignal()
Set output signal. This function provides user level access to output signals. It executes the virtual pre and post hook methods and the virtual actual harware access to set the signal level via DoWriteSignal(int,bool).
Definition at line 734 of file iop_sdevice.cpp. Friends And Related Function Documentation◆ SDeviceSynchro
Definition at line 772 of file iop_sdevice.cpp. Member Data Documentation◆ mCancelRequest
Background: terminate-flag for background task. Definition at line 661 of file iop_sdevice.h. ◆ mCycleCount
Background: cycle counter (shared) Definition at line 623 of file iop_sdevice.h. ◆ mCycleTime
Cycle time of background thread in nsecs (shared) Definition at line 620 of file iop_sdevice.h. ◆ mInputNegEdgeIndexMap
Reverse input map: map signal edges to logical event sets. Definition at line 476 of file iop_sdevice.h. ◆ mInputPosEdgeIndexMap
Reverse input map: map signal edges to logical event sets. Definition at line 473 of file iop_sdevice.h. ◆ mInputReady
Background: some input event did occur (shared) Definition at line 646 of file iop_sdevice.h. ◆ mMaxBitAddress
Address range. Definition at line 482 of file iop_sdevice.h. ◆ mMutex
Background: mutex for below shared variables. Definition at line 609 of file iop_sdevice.h. ◆ mOutputLevelIndexMap
Reverse output map: map signal addres to events that affect the resp. line Definition at line 479 of file iop_sdevice.h. ◆ mpInputEdges
Background: accumulated edges (shared) Definition at line 640 of file iop_sdevice.h. ◆ mpOutputLevels
Background: accumulated output values (shared) Definition at line 658 of file iop_sdevice.h. ◆ mpRecentInputEdges
Background: recently accumulated edges (global only) Definition at line 643 of file iop_sdevice.h. ◆ mRecentCycleCount
Background: cycle count (global only) Definition at line 626 of file iop_sdevice.h. ◆ mSyncWrite
True for synchronous output writes. Definition at line 612 of file iop_sdevice.h. ◆ mThreadSynchro
Background: thread handle (global) Definition at line 617 of file iop_sdevice.h. ◆ pConfiguration
Overall configuration (with actual type) Definition at line 470 of file iop_sdevice.h. The documentation for this class was generated from the following files: libFAUDES 2.32f --- 2024.12.22 --- c++ api documentaion by doxygen |