iop_vdevice.h
Go to the documentation of this file.
1 /** @file iop_vdevice.h Virtual device for interface definition */
2 
3 /*
4  FAU Discrete Event Systems Library (libfaudes)
5 
6  Copyright (C) 2008, Thomas Moor
7  Exclusive copyright is granted to Klaus Schmidt
8 
9 */
10 
11 
12 
13 #ifndef FAUDES_VDEVICE_H
14 #define FAUDES_VDEVICE_H
15 
16 #include "corefaudes.h"
17 #include "tp_include.h"
18 #include "sp_densityfnct.h"
19 
20 
21 
22 // Note: iodevice debuggung uses direct console output since
23 // std redirection is not threadsafe.
24 
25 // Debugging: io level
26 #ifdef FAUDES_DEBUG_IODEVICE
27 #define FD_DH(message) FAUDES_WRITE_DIRECT("FAUDES_IODEVICE: " << message)
28 #else
29 #define FD_DH(message)
30 #endif
31 
32 
33 // Debugging: io level verbose
34 #ifdef FAUDES_DEBUG_IOVERBOSE
35 #define FD_DHV(message) FAUDES_WRITE_DIRECT("FAUDES_IODEVICE: " << message)
36 #else
37 #define FD_DHV(message)
38 #endif
39 
40 
41 // Debugging: io performance
42 #ifdef FAUDES_DEBUG_IOPERF
43 #define FD_DHT(message) FAUDES_WRITE_DIRECT("FAUDES_IOTIMING: " << message)
44 #else
45 #define FD_DHT(message)
46 #endif
47 
48 
49 // Max number of time stamps for performance monitor
50 #define FAUDES_DEBUG_IOPERF_SAMPLES 10000
51 
52 
53 
54 namespace faudes {
55 
56 
57 
58 /**
59  * Attribute for the configuration of a input or output mapping
60  *
61  * The base class for all device event attributes only distinguishes between
62  * output and input events. The actual attribute is of type AttributeVoid.
63  * Derived classes are meant to override this type in order to provide the
64  * defining data for the actual mapping of physical and logical events.
65  *
66  */
67 
69 
71 
72  public:
73 
74  /** Default constructor (no attributes, aka undefined) */
75 
77 
78  /** Copy constructor */
79  AttributeDeviceEvent(const AttributeDeviceEvent& rOtherAttr);
80 
81  /** Destructor */
82  virtual ~AttributeDeviceEvent(void);
83 
84  /** Clear */
85  virtual void Clear(void);
86 
87  /** Test for default value (undefined) */
88  virtual bool IsDefault(void) const {return (!mpOutputAttribute && !mpInputAttribute); };
89 
90  /** Does this attribute define an output mapping? */
91  bool IsOutput(void) const {return mpOutputAttribute!=0; };
92 
93  /** Does this attribute define a input mapping? */
94  bool IsInput(void) const {return mpInputAttribute!=0; };
95 
96  /** Set to default output attribute */
97  void DefaultOutput(void) {
98  Clear();
99  mpOutputAttribute= pOutputPrototype->New();
100  };
101 
102  /** Set to default input attribute */
103  void DefaultInput(void) {
104  Clear();
105  mpInputAttribute= pInputPrototype->New();
106  };
107 
108  /** Set output attribute */
109  virtual void Output(const AttributeVoid& rOutputAttribute) {
110  DefaultOutput();
111  mpOutputAttribute->Assign(rOutputAttribute);
112  };
113 
114  /** Set input attribute */
115  virtual void Input(const AttributeVoid& rInputAttribute) {
116  DefaultInput();
117  mpInputAttribute->Assign(rInputAttribute);
118  };
119 
120  /** Read output attribute */
121  virtual void ReadOutput(TokenReader& rTr) {
122  DefaultOutput();
123  mpOutputAttribute->Read(rTr);
124  };
125 
126  /** Read input attribute */
127  virtual void ReadInput(TokenReader& rTr) {
128  DefaultInput();
129  mpInputAttribute->Read(rTr);
130  };
131 
132  /** Get output mapping (return 0 if its not an output) */
133  const AttributeVoid* Outputp(void) const {return mpOutputAttribute; };
134 
135  /** Get input mapping (return 0 if its not a input) */
136  const AttributeVoid* Inputp(void) const {return mpInputAttribute; };
137 
138 
139 protected:
140 
141  /** Output Attribute (use cast in derived classes) */
143 
144  /** Input Attribute (use cast in derived classes) */
146 
147  /** Output Prototype (set to nontrivial attribute in derived classes) */
149 
150  /** Input Prototype (set to nontrivial attribute in derived classes) */
152 
153  /** Fallback attribute type (initialize on first use static construct)*/
154  static const AttributeVoid* FallbackAttributep(void);
155 
156  /**
157  * Assignment
158  *
159  * @param rSrcAttr
160  * Source to copy from
161  */
162  void DoAssign(const AttributeDeviceEvent& rSrcAttr);
163 
164 
165  /**
166  * Reads the attribute from TokenReader, see AttributeVoid for public wrappers.
167  *
168  * If the current token indicates an "Input" or "Output" section, the method reads that
169  * section. Else it does nothing. Exceptions may only be thrown
170  * on invalid data within the section. The label argument is ignored.
171  * The context argument is ignored.
172  *
173  * @param rTr
174  * TokenReader to read from
175  * @param rLabel
176  * Section to read
177  * @param pContext
178  * Read context to provide contextual information
179  *
180  * @exception Exception
181  * - IO error (id 1)
182  */
183  virtual void DoRead(TokenReader& rTr,const std::string& rLabel="", const Type* pContext=0);
184 
185  /**
186  * Writes the attribute to TokenWriter, see AttributeVoid for public wrappers.
187  *
188  * Writes all present device event attributes to include the defining data.
189  * The label argument is ignored, we use hardcoded labels "Input" or "Output".
190  * The context argument is ignored.
191  *
192  * @param rTw
193  * TokenWriter to write to
194  * @param rLabel
195  * Section to write
196  * @param pContext
197  * Read context to provide contextual information
198  *
199  * @exception Exception
200  * - IO error (id 2)
201  */
202  virtual void DoWrite(TokenWriter& rTw,const std::string& rLabel="", const Type* pContext=0) const;
203 
204 
205 
206 }; // class AttributeDeviceEvent
207 
208 
209 
210 /**
211  * Virtual base class to define the interface for event io.
212  *
213  * @section IOPvdeviceA Input and Output event IO
214  *
215  * A vDevice provides an virtual interface to execute output events and sense
216  * input events, ie ReadInput() and WriteOutput(). The latter is prepared to
217  * be organized as a background thread that accumulates events in an internal fifo buffer.
218  * Once a input event has been read by the application, the buffer is cleared.
219  * A device is configured by passing an event set with device event attributes. The virtual
220  * base class formalls takes void attributes, and uses a dynamic cast to the actual attribute
221  * type that is provided by any derived class.
222  *
223  * @section IOPvdeviceB Physical Time
224  *
225  * The vDevice defines an interface to access the current physical time. The default
226  * implementation has msec resolution and is based on the system clock. Time may be queried
227  * in ms by CurrentTimeMs() or in faudes time unis (ftu) by CurrentTime(). Faudes time units
228  * refer to defining data in eg guards and invariants of timed automata or stochastical
229  * execution properties. Conversion to physical time is by the factor mTimeScale given in
230  * msecs per ftu. There is also a default implementation WaitInputs() for timed waiting
231  * for events based on condition variables.
232  * This requires a derived class to send the according signal. Both, physical
233  * time and waiting for events, may be overwritten in derived classes.
234  *
235  * @section IOPvdeviceC Operating Status
236  *
237  * The device may be in one of four operating states Down, StartUp, Up or ShutDown. Once configured
238  * you may Start() the device. The device will assychonously allocate required resources
239  * and if successful eventually be in state Up. While the device is Up, you can write
240  * outputs and read events. You can request the device to release resources by calling
241  * Stop(). While Up, you may also Reset() the device, to set outputs in passive state,
242  * to reset physical time to zero and tu flush the input fifo buffer.
243  *
244  * @section IOPvdeviceD File IO
245  *
246  * The vDevice provides std faudes token io interface via faudes::Type. In addition,
247  * there is a static constructor FromTokenreader() to construct a vDevice
248  * object of specific type as indentifiesd by the token section.
249  *
250  * @section Techical Note
251  *
252  * The vDevice derived classes implement std faudes type semantics for
253  * token IO plus the New() factory function to support type registration required for
254  * XML formated files. Assignment and comparison are, however, not implemented.
255  *
256  * @ingroup IODevicePlugin
257  */
258 
259 class FAUDES_API vDevice : public Type {
260 
261 
262  friend class xDevice;
263 
264 
265  public:
266 
267  /** Enum for device stages */
268  typedef enum { Down, StartUp, Up , ShutDown } DeviceState;
269 
270  /**
271  * Default constructor
272  */
273  vDevice(void);
274 
275  /**
276  * Construct on heap from token reader.
277  *
278  * This constructor examines the token strean, determines the coressponding
279  * class and constructs the device on the heap. Todo: the implementation
280  * of this function is a hack, there must be proper
281  * solution to this issue.
282  *
283  * @param rTr
284  * TokenReader to read from
285  * @return
286  * vDevice pointer
287  *
288  * @exception Exception
289  * - token mismatch (id 552)
290  * - IO errors (id 1)
291  */
292  static vDevice* FromTokenReader(TokenReader& rTr);
293 
294  /**
295  * Construct on heap from file.
296  *
297  * This constructor examines the file, determines the coressponding
298  * class and constructs the device on the heap.
299  *
300  * @param rFileName
301  * Filename
302  * @return
303  * vDevice pointer
304  *
305  * @exception Exception
306  * - token mismatch (id 552)
307  * - IO errors (id 1)
308  */
309  static vDevice* FromFile(const std::string& rFileName);
310 
311 
312  /**
313  * Explicit destructor.
314  */
315  virtual ~vDevice(void);
316 
317 
318  /**
319  * Set the device name
320  *
321  * @param rName
322  * Generator name
323  */
324  void Name(const std::string& rName);
325 
326  /**
327  * Get device name
328  *
329  * @return
330  * Name of generator
331  */
332  const std::string& Name(void) const;
333 
334 
335  /**
336  * Set tolerance for time synchonisation.
337  *
338  * @param maxgap
339  * Max acceptable amount of time by which the generator may be behind device time.
340  *
341  */
342  void Tolerance(Time::Type maxgap) {mMaxSyncGap=maxgap;};
343 
344 
345  /**
346  * Get tolerance.
347  *
348  * @return
349  * Max acceptable amount of time by which the generator may be behind device time
350  *
351  */
352  Time::Type Tolerance(void) {return mMaxSyncGap;};
353 
354 
355  /**
356  * Set timescale.
357  *
358  * @param scale
359  * Conversion factor in msecs/ftu (faudes time units)
360  *
361  */
362  virtual void TimeScale(unsigned int scale) {mTimeScale=scale; CurrentTime(0); };
363 
364 
365  /**
366  * Get timescale.
367  *
368  * @return
369  * Conversion factor in msecs/ftu (faudes time units)
370  *
371  */
372  virtual int TimeScale(void) {return mTimeScale;};
373 
374 
375  /**
376  * Clear all configuration.
377  * This implies Stop().
378  */
379  virtual void Clear(void);
380 
381  /**
382  * Insert/edit input or output configuration
383  *
384  * For a nontrivial device, a dynamic cast is used to
385  * access the attribute parameter.
386  *
387  * @param event
388  * Input or output event by faudes index
389  * @param attr
390  * Configuration attribute
391  * @exception Exception
392  * - unknown event (id 65)
393  * - Cannot cast attribute (id 550)
394  */
395  virtual void Configure(Idx event, const AttributeDeviceEvent& attr);
396 
397  /**
398  * Configure by alphabet
399  *
400  * For a nontrivial device, a dynamic cast is used to
401  * access atributes of the alphabet parameter.
402  *
403  * @param rPhysicalEvents
404  * Event set with configuration attributes
405  * @exception Exception
406  * - Cannot cast argument (id 550)
407  */
408  virtual void Configure(const EventSet& rPhysicalEvents);
409 
410 
411  /**
412  * Compile inner data-structures.
413  *
414  * As every derived class may have its own individual inner data-structures to
415  * set up, it has to reimplement its own Compile()-function if needed.
416  *
417  * In the base class Compile() builds up the input- and output event set.
418  *
419  */
420  virtual void Compile(void);
421 
422 
423  /**
424  * Get outputs as plain set.
425  *
426  * @return
427  * Set of all configured outputs
428  */
429  virtual const EventSet& Outputs(void) const;
430 
431  /**
432  * Get inputs as plain set.
433  *
434  * @return
435  * Set of all configured inputs
436  */
437  virtual const EventSet& Inputs(void) const;
438 
439 
440  /**
441  * Reset device. Resets any dynamic state such as edge detection.
442  * Since the vDevice only provides timing, it only resets the current faudes
443  * time to zero. A reset does not stop the device.
444  *
445  */
446  virtual void Reset(void);
447 
448  /**
449  * A device may ask for a reset by returning true for ResetRequest(). A well behaved
450  * simulator application will perform a Reset() and initialise any faudes::Executors,
451  * and stop the simulation. The device is meant to cancel any pending WaitInputs()
452  * or WaitInputsMs() when it requests a reset. The default implementation returns
453  * false;
454  *
455  * @return
456  * True, if a reset is requested
457  *
458  */
459  virtual bool ResetRequest(void);
460 
461  /**
462  * Activate the device. This function enables output execution and input reading.
463  * It will allocate device specific necessary resources eg start a background thread,
464  * initialise operating system device drivers etc.
465  *
466  * @exception Exception
467  * - Not yet configured (id 551)
468  */
469  virtual void Start(void);
470 
471  /**
472  * Deactivate the device. This function disables output execution and input reading.
473  * Stop also runs Reset.
474  *
475  */
476  virtual void Stop(void);
477 
478  /**
479  * Get status. This function returns the current status of the device.
480  * In derived classes that use background threads for input reading etc,
481  * a device may change its status without notice. Stop runs Reset()
482  *
483  */
484  virtual DeviceState Status(void) { return mState;};
485 
486  /**
487  * Get status as infromal string.
488  *
489  */
490  virtual std::string StatusString(void);
491 
492 
493  /**
494  * Run output command.
495  *
496  * @exception Exception
497  * - unknown output event (id 65)
498  *
499  */
500  virtual void WriteOutput(Idx output)=0;
501 
502  /**
503  * Flush pending IO Operations
504  *
505  * A device may implement buffered output operations, i.e. to assemble a process
506  * image befor applying it to the physical plant.
507  * By FlushOutputs() you can ask the device to execute all buffered
508  * output operations. FlushOutputs() is called by
509  * WaitInputs() and WaitInputsMs(), so buffers are automatically
510  * flushed when the simulation waits for input events.
511  * The default impelmentation of FlushOutputs() does nothing.
512  *
513  */
514  virtual void FlushOutputs(void);
515 
516  /**
517  * Read sensed input events.
518  * Report the oldest event from the internal input buffer.
519  * The event is removed from the buffer. The function returns
520  * 0 if the buffer is empty.
521  *
522  */
523  virtual Idx ReadInput(void);
524 
525  /**
526  * Peek for sensed events.
527  * Report the oldest input-event from the buffer. However,
528  * dont remove the event.
529  *
530  * @return
531  * Input-event index or 0 if no such available.
532  */
533  virtual Idx PeekInput(void);
534 
535 
536  /**
537  * Report whether a input-event is ready
538  */
539  virtual bool InputReady(void);
540 
541 
542  /**
543  * Wait for input trigger.
544  *
545  * The default implementation assumes that inputs events are
546  * notified via the condition signal. The duration to wait
547  * is specified in faudes time units (ftu) and is converted to system time
548  * by the scaling factor mTimeScale (ms/ftu).
549  *
550  * @return
551  * True, if events are available for read.
552  */
553  virtual bool WaitInputs(Time::Type duration);
554 
555  /**
556  * Wait for input trigger.
557  *
558  * Same as WaitInputs, but with the maximum time to wait given in
559  * msecs.
560  *
561  * @return
562  * True, if events are available for read.
563  */
564  virtual bool WaitInputsMs(long int duration);
565 
566 
567  /**
568  * Report physical time in ftu.
569  *
570  * The time elapsed since the last reset is retunred
571  * in faudes time units (ftu).
572  *
573  * @return
574  * Physical time.
575  */
576  virtual Time::Type CurrentTime(void);
577 
578  /**
579  * Report physical time in ms
580  *
581  * The time elapsed since the last reset is returned
582  * in msecs.
583  *
584  * @return
585  * Physical time.
586  */
587  virtual long int CurrentTimeMs(void);
588 
589  /**
590  * Set physical time in ftu.
591  * @param now
592  * physical time in faudes time units (ftu).
593  */
594  virtual void CurrentTime(Time::Type now);
595 
596 
597  /**
598  * Set physical time in ms.
599  * @param nowms
600  * physical time in msec
601  */
602  virtual void CurrentTimeMs(long int nowms);
603 
604 
605  /**
606  * Convert faudes time unit duration to system time
607  *
608  * Note: this helper function is not static since it refers to
609  * the parameter mTimeScale.
610  *
611  * @return
612  * Absolut system-time form now + duration in the future
613  * @param duration
614  * Time in faudes-time
615  */
616  virtual faudes_systime_t FtuToSystemTime(Time::Type duration);
617 
618  /** Tell the device which condition to use for waiting */
619  void UseCondition(faudes_mutex_t* wmutex, faudes_cond_t* wcond);
620 
621  /** Tell the device which buffer to use for inputs */
622  void UseBuffer(faudes_mutex_t* bmutex, std::deque<Idx>* bbuffer);
623 
624  /** Convenience method */
625  virtual std::string EStr(Idx ev) {return Inputs().Str(ev);};
626 
627  /** Get performance (need compiletime option) */
628  SampledDensityFunction Performance(void);
629 
630  /** Clear performance (need compiletime option) */
631  void ResetPerformance(void);
632 
633  /** Convenience method */
634  void WritePerformance(void);
635 
636  /**
637  * Stop all devices.
638  * This function is intended to be called on ungraceful termination of a
639  * simulater application. It uses a global variable that tracks all device
640  * instances.
641  *
642  */
643  static void StopAll(void);
644 
645  protected:
646 
647  /**
648  * Token output, see Type::Write for public wrappers.
649  * The vDevice inplements token writing to consist of DoWritePreface (device name and time scale).
650  * and DoWriteConfiguration (device specific event attributes). The default label is taken from the
651  * member variable mDefaultLabel. Derived classes are meant to set mDefaultLabel in their constructor
652  * and to reimplement DoWritePreface to add additional data eg cycle time or network address.
653  * The parameter pContext is ignored and passed on.
654  *
655  * @param rTw
656  * Reference to TokenWriter
657  * @param rLabel
658  * Label of section to write, defaults to name of set
659  * @param pContext
660  * Write context to provide contextual information
661  */
662  virtual void DoWrite(TokenWriter& rTw, const std::string& rLabel="", const Type* pContext=0) const;
663 
664  /** Writes non-event-configuration data from TokenWriter
665  *
666  * This function is part of the non-event-configuration token-output mechanism. The vDevice will write
667  * its name and the time scale, derived classes are meant to first call the base class method and then
668  * add additional configuration parameter.
669  *
670  * Note: in order to keep the inputfile-layout as easy as possible no label will be used to separate
671  * this data-section. Never the less a default-label ("Device") is specified.
672  *
673  * @param rTw
674  * TokenWriter to write to
675  * @param rLabel
676  * Section to read
677  * @param pContext
678  * Provide contextual information
679  *
680  * */
681  virtual void DoWritePreface(TokenWriter& rTw, const std::string& rLabel="", const Type* pContext=0) const;
682 
683 
684  /** Writes event-configuration to TokenWriter
685  *
686  * This function is part of the event-configuration token-output mechanism. It writes the device-specific
687  * event-configuration to provided TokenWriter. It uses the virtual interface of TBaseSet to figure the
688  * actual attribute type.
689  *
690  * Note: the event-configuration will be labeled by "EventConfiguration"
691  *
692  * @param rTw
693  * TokenWriter to write to
694  * @param rLabel
695  * Section to write
696  * @param pContext
697  * Provide contextual information
698  *
699  */
700  virtual void DoWriteConfiguration(TokenWriter& rTw, const std::string& rLabel="", const Type* pContext=0) const;
701 
702  /**
703  * Token input, see Type::DRead for public wrappers.
704  * The vDevice implkements token input to consist of DoReadPreface (name, time scale etc) and DoReadConfiguration
705  * (events attributes), followed by Compile (set up internal data structures). The default label is given by
706  * the member variable mDefaultLabel. Derived classes arte meant to set mDefaultLabel in their constructor and
707  * to reimplement DoReadPreface to cover additional parameters. The pContext parameter is ignored.
708  *
709  * @param rTr
710  * Reference to TokenReader
711  * @param rLabel
712  * Label of section to write, defaults to name of set
713  * @param pContext
714  * Write context to provide contextual information
715  */
716  virtual void DoRead(TokenReader& rTr, const std::string& rLabel = "", const Type* pContext=0);
717 
718  /** Default label for token io */
719  std::string mDefaultLabel;
720 
721  /** Reads non-event-configuration data from TokenReader
722  *
723  * This function is part of the non-event-configuration token-input mechanism and located at the top
724  * of the class hierarchy. The vDevice will read its name and the time scale, derived classes are meant
725  * to first call the base class method and then read add additional configuration parameters.
726  *
727  * Note: in order to keep the inputfile-layout as easy as possible no label will be used to separate
728  * this data-section. Never the less a default-label ("Device") is specified.
729  *
730  * @param rTr
731  * TokenReader to write
732  * @param rLabel
733  * Section to read
734  * @param pContext
735  * Provide contextual information
736  *
737  */
738  virtual void DoReadPreface(TokenReader& rTr, const std::string& rLabel = "", const Type* pContext=0);
739 
740  /** Reads event-configuration data from TokenReader
741  *
742  * This function is part of the token-input mechanism and reads the device-specific event-configuration.
743  * It uses the virtual interface of TBaseSet to figure the actual attribute type. The section defaults to
744  * "EventConfiguration".
745  *
746  * @param rTr
747  * TokenReader to read
748  * @param rLabel
749  * Section to read
750  * @param pContext
751  Provide contextual information
752  * */
753  virtual void DoReadConfiguration(TokenReader& rTr, const std::string& rLabel = "", const Type* pContext=0);
754 
755  /** Name */
756  std::string mName;
757 
758  /** Overall event configuration (uses cast for type) */
760 
761  /** All inputs */
763 
764  /** All outputs */
766 
767  /** Status: running, starting etc */
769 
770  /** Default Wait Condition Mutex */
771  faudes_mutex_t mWaitMutex;
772 
773  /** Default Wait Condition */
774  faudes_cond_t mWaitCondition;
775 
776  /** Actual Wait Condition Mutex*/
777  faudes_mutex_t* pWaitMutex;
778 
779  /** Actual Wait Condition */
780  faudes_cond_t* pWaitCondition;
781 
782  /** physical timepoint zero */
783  faudes_systime_t mTimeZero;
784 
785  /** FauDES-time: scaling factor in ms/ftu */
787 
788  /** Toleance for time sync */
790 
791  /** Default Fifo buffer for input readings */
792  std::deque<Idx> mInputBuffer;
793 
794  /** Actual Fifo buffer for input readings */
795  std::deque<Idx>* pInputBuffer;
796 
797  /** Default mutex for input buffer (mutexted) */
798  faudes_mutex_t mBufferMutex;
799 
800  /** Actual mutex for input buffer (mutexted) */
801  faudes_mutex_t* pBufferMutex;
802 
803  /** Reset request marker (mutexed) */
805 
806  /**
807  * convert duration from fauDES-time units to ms
808  *
809  */
810  virtual long int FtuToMs(Time::Type faudes_time);
811 
812  /**
813  * convert duration in ms to faudes-time units
814  *
815  */
816  virtual Time::Type MsToFtu(long int real_time);
817 
818 
819 #ifdef FAUDES_DEBUG_IOPERF
820 
821  /** Filename for performance log */
822 #define FAUDES_DEBUG_IOPERF_LOG "tmp_ioperformance.txt"
823 
824  /** Structures to store time-samples in */
825  faudes_systime_t* mpPerformanceWaitEnter;
826  faudes_systime_t* mpPerformanceWaitExit;
827 
828  /** Global iterator */
831 
832 #endif
833 
834  private:
835 
836  // track all devices (initialize on first use construct)
837  static std::set<vDevice*>& AllDevices(void);
838 
839 }; // end class vDevice
840 
841 
842 
843 } // namespace faudes
844 
845 
846 #endif
847 
#define FAUDES_API
Definition: cfl_platform.h:80
#define FAUDES_TYPE_DECLARATION(ftype, ctype, cbase)
Definition: cfl_types.h:880
const AttributeVoid * pOutputPrototype
Definition: iop_vdevice.h:148
const AttributeVoid * Outputp(void) const
Definition: iop_vdevice.h:133
const AttributeVoid * Inputp(void) const
Definition: iop_vdevice.h:136
virtual void Output(const AttributeVoid &rOutputAttribute)
Definition: iop_vdevice.h:109
virtual void Input(const AttributeVoid &rInputAttribute)
Definition: iop_vdevice.h:115
const AttributeVoid * pInputPrototype
Definition: iop_vdevice.h:151
virtual void ReadInput(TokenReader &rTr)
Definition: iop_vdevice.h:127
bool IsOutput(void) const
Definition: iop_vdevice.h:91
AttributeVoid * mpInputAttribute
Definition: iop_vdevice.h:145
AttributeVoid * mpOutputAttribute
Definition: iop_vdevice.h:136
virtual bool IsDefault(void) const
Definition: iop_vdevice.h:88
bool IsInput(void) const
Definition: iop_vdevice.h:94
virtual void ReadOutput(TokenReader &rTr)
Definition: iop_vdevice.h:121
int mPerformanceBeginIterator
Definition: iop_vdevice.h:830
Time::Type mMaxSyncGap
Definition: iop_vdevice.h:789
faudes_systime_t mTimeZero
Definition: iop_vdevice.h:783
faudes_mutex_t * pBufferMutex
Definition: iop_vdevice.h:801
faudes_cond_t mWaitCondition
Definition: iop_vdevice.h:774
faudes_systime_t * mpPerformanceWaitEnter
Definition: iop_vdevice.h:825
std::string mDefaultLabel
Definition: iop_vdevice.h:719
faudes_cond_t * pWaitCondition
Definition: iop_vdevice.h:780
virtual void TimeScale(unsigned int scale)
Definition: iop_vdevice.h:362
faudes_mutex_t mWaitMutex
Definition: iop_vdevice.h:771
virtual std::string EStr(Idx ev)
Definition: iop_vdevice.h:625
virtual DeviceState Status(void)
Definition: iop_vdevice.h:484
EventSet * mpConfiguration
Definition: iop_vdevice.h:759
EventSet mInputs
Definition: iop_vdevice.h:762
EventSet mOutputs
Definition: iop_vdevice.h:765
virtual void WriteOutput(Idx output)=0
std::deque< Idx > mInputBuffer
Definition: iop_vdevice.h:792
Time::Type Tolerance(void)
Definition: iop_vdevice.h:352
faudes_mutex_t * pWaitMutex
Definition: iop_vdevice.h:777
std::string mName
Definition: iop_vdevice.h:756
std::deque< Idx > * pInputBuffer
Definition: iop_vdevice.h:795
faudes_systime_t * mpPerformanceWaitExit
Definition: iop_vdevice.h:826
int mPerformanceEndIterator
Definition: iop_vdevice.h:829
DeviceState mState
Definition: iop_vdevice.h:768
void Tolerance(Time::Type maxgap)
Definition: iop_vdevice.h:342
faudes_mutex_t mBufferMutex
Definition: iop_vdevice.h:798
virtual int TimeScale(void)
Definition: iop_vdevice.h:372
uint32_t Idx

libFAUDES 2.33h --- 2025.06.18 --- c++ api documentaion by doxygen