F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TlmChanComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TlmChanComponentAc.cpp
3 // \author Auto-generated
4 // \brief cpp file for TlmChan component base class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #include <stdio.h>
14 #include <FpConfig.hpp>
16 #include <Fw/Types/Assert.hpp>
17 #if FW_ENABLE_TEXT_LOGGING
19 #endif
20 
21 
22 namespace Svc {
23 
24  // ----------------------------------------------------------------------
25  // Anonymous namespace to prevent name collisions
26  // ----------------------------------------------------------------------
27 
28  namespace {
29 
30  typedef enum {
31  TLMCHAN_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
32  RUN_SCHED,
33  PINGIN_PING
34  } MsgTypeEnum;
35 
36  // Get the max size by doing a union of the input port serialization sizes.
37 
38  typedef union {
41  } BuffUnion;
42 
43  // Define a message buffer class large enough to handle all the
44  // asynchronous inputs to the component
45 
46  class ComponentIpcSerializableBuffer :
48  {
49 
50  public:
51 
52  enum {
53  // Max. message size = size of data + message id + port
54  SERIALIZATION_SIZE =
55  sizeof(BuffUnion) +
56  sizeof(NATIVE_INT_TYPE) +
57  sizeof(NATIVE_INT_TYPE)
58  };
59 
60  NATIVE_UINT_TYPE getBuffCapacity(void) const {
61  return sizeof(m_buff);
62  }
63 
64  U8* getBuffAddr(void) {
65  return m_buff;
66  }
67 
68  const U8* getBuffAddr(void) const {
69  return m_buff;
70  }
71 
72  private:
73  // Should be the max of all the input ports serialized sizes...
74  U8 m_buff[SERIALIZATION_SIZE];
75 
76  };
77 
78  }
79 
80  // ----------------------------------------------------------------------
81  // Getters for numbers of input ports
82  // ----------------------------------------------------------------------
83 
86  {
87  FW_ASSERT(portNum < this->getNum_TlmRecv_InputPorts(),static_cast<AssertArg>(portNum));
88  return &this->m_TlmRecv_InputPort[portNum];
89  }
90 
93  {
94  FW_ASSERT(portNum < this->getNum_TlmGet_InputPorts(),static_cast<AssertArg>(portNum));
95  return &this->m_TlmGet_InputPort[portNum];
96  }
97 
100  {
101  FW_ASSERT(portNum < this->getNum_Run_InputPorts(),static_cast<AssertArg>(portNum));
102  return &this->m_Run_InputPort[portNum];
103  }
104 
107  {
108  FW_ASSERT(portNum < this->getNum_pingIn_InputPorts(),static_cast<AssertArg>(portNum));
109  return &this->m_pingIn_InputPort[portNum];
110  }
111 
112  // ----------------------------------------------------------------------
113  // Typed connectors for output ports
114  // ----------------------------------------------------------------------
115 
118  NATIVE_INT_TYPE portNum,
119  Fw::InputComPort* port
120  )
121  {
122  FW_ASSERT(portNum < this->getNum_PktSend_OutputPorts(),static_cast<AssertArg>(portNum));
123  this->m_PktSend_OutputPort[portNum].addCallPort(port);
124  }
125 
128  NATIVE_INT_TYPE portNum,
129  Svc::InputPingPort* port
130  )
131  {
132  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
134  }
135 
136  // ----------------------------------------------------------------------
137  // Serialization connectors for output ports
138  // ----------------------------------------------------------------------
139 
140 #if FW_PORT_SERIALIZATION
141 
144  NATIVE_INT_TYPE portNum,
145  Fw::InputSerializePort *port
146  )
147  {
148  FW_ASSERT(portNum < this->getNum_PktSend_OutputPorts(),static_cast<AssertArg>(portNum));
149  return this->m_PktSend_OutputPort[portNum].registerSerialPort(port);
150  }
151 
154  NATIVE_INT_TYPE portNum,
155  Fw::InputSerializePort *port
156  )
157  {
158  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
159  return this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
160  }
161 
162 #endif
163 
164  // ----------------------------------------------------------------------
165  // Component construction, initialization, and destruction
166  // ----------------------------------------------------------------------
167 
168  TlmChanComponentBase ::
169 #if FW_OBJECT_NAMES == 1
170  TlmChanComponentBase(const char* compName) :
171  Fw::ActiveComponentBase(compName)
172 #else
173  TlmChanComponentBase() :
174  Fw::ActiveComponentBase()
175 #endif
176  {
177 
178 
179 
180  }
181 
183  init(
184  NATIVE_INT_TYPE queueDepth,
185  NATIVE_INT_TYPE instance
186  )
187  {
188 
189  // Initialize base class
191 
192  // Connect input port TlmRecv
193  for (
194  NATIVE_INT_TYPE port = 0;
195  port < this->getNum_TlmRecv_InputPorts();
196  port++
197  ) {
198 
199  this->m_TlmRecv_InputPort[port].init();
200  this->m_TlmRecv_InputPort[port].addCallComp(
201  this,
202  m_p_TlmRecv_in
203  );
204  this->m_TlmRecv_InputPort[port].setPortNum(port);
205 
206 #if FW_OBJECT_NAMES == 1
207  char portName[120];
208  (void) snprintf(
209  portName,
210  sizeof(portName),
211  "%s_TlmRecv_InputPort[%d]",
212  this->m_objName,
213  port
214  );
215  this->m_TlmRecv_InputPort[port].setObjName(portName);
216 #endif
217 
218  }
219 
220  // Connect input port TlmGet
221  for (
222  NATIVE_INT_TYPE port = 0;
223  port < this->getNum_TlmGet_InputPorts();
224  port++
225  ) {
226 
227  this->m_TlmGet_InputPort[port].init();
228  this->m_TlmGet_InputPort[port].addCallComp(
229  this,
231  );
232  this->m_TlmGet_InputPort[port].setPortNum(port);
233 
234 #if FW_OBJECT_NAMES == 1
235  char portName[120];
236  (void) snprintf(
237  portName,
238  sizeof(portName),
239  "%s_TlmGet_InputPort[%d]",
240  this->m_objName,
241  port
242  );
243  this->m_TlmGet_InputPort[port].setObjName(portName);
244 #endif
245 
246  }
247 
248  // Connect input port Run
249  for (
250  NATIVE_INT_TYPE port = 0;
251  port < this->getNum_Run_InputPorts();
252  port++
253  ) {
254 
255  this->m_Run_InputPort[port].init();
256  this->m_Run_InputPort[port].addCallComp(
257  this,
258  m_p_Run_in
259  );
260  this->m_Run_InputPort[port].setPortNum(port);
261 
262 #if FW_OBJECT_NAMES == 1
263  char portName[120];
264  (void) snprintf(
265  portName,
266  sizeof(portName),
267  "%s_Run_InputPort[%d]",
268  this->m_objName,
269  port
270  );
271  this->m_Run_InputPort[port].setObjName(portName);
272 #endif
273 
274  }
275 
276  // Connect input port pingIn
277  for (
278  NATIVE_INT_TYPE port = 0;
279  port < this->getNum_pingIn_InputPorts();
280  port++
281  ) {
282 
283  this->m_pingIn_InputPort[port].init();
284  this->m_pingIn_InputPort[port].addCallComp(
285  this,
287  );
288  this->m_pingIn_InputPort[port].setPortNum(port);
289 
290 #if FW_OBJECT_NAMES == 1
291  char portName[120];
292  (void) snprintf(
293  portName,
294  sizeof(portName),
295  "%s_pingIn_InputPort[%d]",
296  this->m_objName,
297  port
298  );
299  this->m_pingIn_InputPort[port].setObjName(portName);
300 #endif
301 
302  }
303 
304  // Initialize output port PktSend
305  for (
306  NATIVE_INT_TYPE port = 0;
307  port < this->getNum_PktSend_OutputPorts();
308  port++
309  ) {
310  this->m_PktSend_OutputPort[port].init();
311 
312 #if FW_OBJECT_NAMES == 1
313  char portName[120];
314  (void) snprintf(
315  portName,
316  sizeof(portName),
317  "%s_PktSend_OutputPort[%d]",
318  this->m_objName,
319  port
320  );
321  this->m_PktSend_OutputPort[port].setObjName(portName);
322 #endif
323 
324  }
325 
326  // Initialize output port pingOut
327  for (
328  NATIVE_INT_TYPE port = 0;
329  port < this->getNum_pingOut_OutputPorts();
330  port++
331  ) {
332  this->m_pingOut_OutputPort[port].init();
333 
334 #if FW_OBJECT_NAMES == 1
335  char portName[120];
336  (void) snprintf(
337  portName,
338  sizeof(portName),
339  "%s_pingOut_OutputPort[%d]",
340  this->m_objName,
341  port
342  );
343  this->m_pingOut_OutputPort[port].setObjName(portName);
344 #endif
345 
346  }
347 
348  Os::Queue::QueueStatus qStat =
349  this->createQueue(
350  queueDepth,
351  ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
352  );
353  FW_ASSERT(
354  Os::Queue::QUEUE_OK == qStat,
355  static_cast<AssertArg>(qStat)
356  );
357 
358  }
359 
362 
363  }
364 
365  // ----------------------------------------------------------------------
366  // Invocation functions for output ports
367  // ----------------------------------------------------------------------
368 
369  void TlmChanComponentBase ::
370  PktSend_out(
371  NATIVE_INT_TYPE portNum,
372  Fw::ComBuffer &data, U32 context
373  )
374  {
375  FW_ASSERT(portNum < this->getNum_PktSend_OutputPorts(),static_cast<AssertArg>(portNum));
376  this->m_PktSend_OutputPort[portNum].invoke(data, context);
377  }
378 
381  NATIVE_INT_TYPE portNum,
382  U32 key
383  )
384  {
385  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
386  this->m_pingOut_OutputPort[portNum].invoke(key);
387  }
388 
389  // ----------------------------------------------------------------------
390  // Getters for numbers of ports
391  // ----------------------------------------------------------------------
392 
393  NATIVE_INT_TYPE TlmChanComponentBase ::
394  getNum_TlmRecv_InputPorts(void)
395  {
397  this->m_TlmRecv_InputPort
398  );
399  }
400 
403  {
405  this->m_TlmGet_InputPort
406  );
407  }
408 
411  {
413  this->m_Run_InputPort
414  );
415  }
416 
417  NATIVE_INT_TYPE TlmChanComponentBase ::
418  getNum_PktSend_OutputPorts(void)
419  {
421  this->m_PktSend_OutputPort
422  );
423  }
424 
427  {
429  this->m_pingIn_InputPort
430  );
431  }
432 
435  {
438  );
439  }
440 
441  // ----------------------------------------------------------------------
442  // Port connection status queries
443  // ----------------------------------------------------------------------
444 
445  bool TlmChanComponentBase ::
446  isConnected_PktSend_OutputPort(NATIVE_INT_TYPE portNum)
447  {
448  FW_ASSERT(
449  portNum < this->getNum_PktSend_OutputPorts(),
450  static_cast<AssertArg>(portNum)
451  );
452  return this->m_PktSend_OutputPort[portNum].isConnected();
453  }
454 
457  {
458  FW_ASSERT(
459  portNum < this->getNum_pingOut_OutputPorts(),
460  static_cast<AssertArg>(portNum)
461  );
462  return this->m_pingOut_OutputPort[portNum].isConnected();
463  }
464 
465  // ----------------------------------------------------------------------
466  // Mutex functions for guarded ports
467  // ----------------------------------------------------------------------
468 
469  void TlmChanComponentBase ::
470  lock(void)
471  {
472  this->m_guardedPortMutex.lock();
473  }
474 
476  unLock(void)
477  {
478  this->m_guardedPortMutex.unLock();
479  }
480 
481  // ----------------------------------------------------------------------
482  // Calls for invocations received on typed input ports
483  // ----------------------------------------------------------------------
484 
485  void TlmChanComponentBase ::
486  m_p_TlmRecv_in(
487  Fw::PassiveComponentBase* callComp,
488  NATIVE_INT_TYPE portNum,
489  FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val
490  )
491  {
492  FW_ASSERT(callComp);
493  TlmChanComponentBase* compPtr =
494  (TlmChanComponentBase*) callComp;
495  compPtr->TlmRecv_handlerBase(portNum, id, timeTag, val);
496  }
497 
500  Fw::PassiveComponentBase* callComp,
501  NATIVE_INT_TYPE portNum,
502  FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val
503  )
504  {
505  FW_ASSERT(callComp);
506  TlmChanComponentBase* compPtr =
507  (TlmChanComponentBase*) callComp;
508  compPtr->TlmGet_handlerBase(portNum, id, timeTag, val);
509  }
510 
513  Fw::PassiveComponentBase* callComp,
514  NATIVE_INT_TYPE portNum,
515  NATIVE_UINT_TYPE context
516  )
517  {
518  FW_ASSERT(callComp);
519  TlmChanComponentBase* compPtr =
520  (TlmChanComponentBase*) callComp;
521  compPtr->Run_handlerBase(portNum, context);
522  }
523 
526  Fw::PassiveComponentBase* callComp,
527  NATIVE_INT_TYPE portNum,
528  U32 key
529  )
530  {
531  FW_ASSERT(callComp);
532  TlmChanComponentBase* compPtr =
533  (TlmChanComponentBase*) callComp;
534  compPtr->pingIn_handlerBase(portNum, key);
535  }
536 
537  // ----------------------------------------------------------------------
538  // Port handler base-class functions for typed input ports
539  // ----------------------------------------------------------------------
540 
541  void TlmChanComponentBase ::
542  TlmRecv_handlerBase(
543  NATIVE_INT_TYPE portNum,
544  FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val
545  )
546  {
547 
548  // Make sure port number is valid
549  FW_ASSERT(portNum < this->getNum_TlmRecv_InputPorts(),static_cast<AssertArg>(portNum));
550 
551  // Lock guard mutex before calling
552  this->lock();
553 
554  // Down call to pure virtual handler method implemented in Impl class
555  this->TlmRecv_handler(portNum, id, timeTag, val);
556 
557  // Unlock guard mutex
558  this->unLock();
559 
560  }
561 
564  NATIVE_INT_TYPE portNum,
565  FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val
566  )
567  {
568 
569  // Make sure port number is valid
570  FW_ASSERT(portNum < this->getNum_TlmGet_InputPorts(),static_cast<AssertArg>(portNum));
571 
572  // Lock guard mutex before calling
573  this->lock();
574 
575  // Down call to pure virtual handler method implemented in Impl class
576  this->TlmGet_handler(portNum, id, timeTag, val);
577 
578  // Unlock guard mutex
579  this->unLock();
580 
581  }
582 
585  NATIVE_INT_TYPE portNum,
586  NATIVE_UINT_TYPE context
587  )
588  {
589 
590  // Make sure port number is valid
591  FW_ASSERT(portNum < this->getNum_Run_InputPorts(),static_cast<AssertArg>(portNum));
592 
593  // Call pre-message hook
594  Run_preMsgHook(
595  portNum,
596  context
597  );
598 
599  ComponentIpcSerializableBuffer msg;
601 
602  _status = msg.serialize(
603  static_cast<NATIVE_INT_TYPE>(RUN_SCHED)
604  );
605  FW_ASSERT (
606  _status == Fw::FW_SERIALIZE_OK,
607  static_cast<AssertArg>(_status)
608  );
609 
610  _status = msg.serialize(portNum);
611  FW_ASSERT (
612  _status == Fw::FW_SERIALIZE_OK,
613  static_cast<AssertArg>(_status)
614  );
615 
616  // Serialize argument context
617  _status = msg.serialize(context);
618  FW_ASSERT(
619  _status == Fw::FW_SERIALIZE_OK,
620  static_cast<AssertArg>(_status)
621  );
622 
623 
624  // send message
625  Os::Queue::QueueBlocking _block =
627  Os::Queue::QueueStatus qStatus =
628  this->m_queue.send(msg, 0,_block);
629  FW_ASSERT(
630  qStatus == Os::Queue::QUEUE_OK,
631  static_cast<AssertArg>(qStatus)
632  );
633 
634  }
635 
638  NATIVE_INT_TYPE portNum,
639  U32 key
640  )
641  {
642 
643  // Make sure port number is valid
644  FW_ASSERT(portNum < this->getNum_pingIn_InputPorts(),static_cast<AssertArg>(portNum));
645 
646  // Call pre-message hook
648  portNum,
649  key
650  );
651 
652  ComponentIpcSerializableBuffer msg;
654 
655  _status = msg.serialize(
656  static_cast<NATIVE_INT_TYPE>(PINGIN_PING)
657  );
658  FW_ASSERT (
659  _status == Fw::FW_SERIALIZE_OK,
660  static_cast<AssertArg>(_status)
661  );
662 
663  _status = msg.serialize(portNum);
664  FW_ASSERT (
665  _status == Fw::FW_SERIALIZE_OK,
666  static_cast<AssertArg>(_status)
667  );
668 
669  // Serialize argument key
670  _status = msg.serialize(key);
671  FW_ASSERT(
672  _status == Fw::FW_SERIALIZE_OK,
673  static_cast<AssertArg>(_status)
674  );
675 
676 
677  // send message
678  Os::Queue::QueueBlocking _block =
680  Os::Queue::QueueStatus qStatus =
681  this->m_queue.send(msg, 0,_block);
682  FW_ASSERT(
683  qStatus == Os::Queue::QUEUE_OK,
684  static_cast<AssertArg>(qStatus)
685  );
686 
687  }
688 
689  // ----------------------------------------------------------------------
690  // Pre-message hooks for async input ports
691  // ----------------------------------------------------------------------
692 
693  void TlmChanComponentBase ::
694  Run_preMsgHook(
695  NATIVE_INT_TYPE portNum,
696  NATIVE_UINT_TYPE context
697  )
698  {
699  // Default: no-op
700  }
701 
704  NATIVE_INT_TYPE portNum,
705  U32 key
706  )
707  {
708  // Default: no-op
709  }
710 
711  // ----------------------------------------------------------------------
712  // Message dispatch method for active and queued components. Called
713  // by active component thread or implementation code for queued components
714  // ----------------------------------------------------------------------
715 
717  doDispatch(void)
718  {
719  ComponentIpcSerializableBuffer msg;
720  NATIVE_INT_TYPE priority;
721 
722  Os::Queue::QueueStatus msgStatus = this->m_queue.receive(msg,priority,Os::Queue::QUEUE_BLOCKING);
723  FW_ASSERT(
724  msgStatus == Os::Queue::QUEUE_OK,
725  static_cast<AssertArg>(msgStatus)
726  );
727 
728  // Reset to beginning of buffer
729  msg.resetDeser();
730 
731  NATIVE_INT_TYPE desMsg;
732  Fw::SerializeStatus deserStatus = msg.deserialize(desMsg);
733  FW_ASSERT(
734  deserStatus == Fw::FW_SERIALIZE_OK,
735  static_cast<AssertArg>(deserStatus)
736  );
737 
738  MsgTypeEnum msgType = static_cast<MsgTypeEnum>(desMsg);
739 
740  if (msgType == TLMCHAN_COMPONENT_EXIT) {
741  return MSG_DISPATCH_EXIT;
742  }
743 
745  deserStatus = msg.deserialize(portNum);
746  FW_ASSERT(
747  deserStatus == Fw::FW_SERIALIZE_OK,
748  static_cast<AssertArg>(deserStatus)
749  );
750 
751  switch (msgType) {
752 
753  // Handle async input port Run
754  case RUN_SCHED: {
755 
756  // Deserialize argument context
758  deserStatus = msg.deserialize(context);
759  FW_ASSERT(
760  deserStatus == Fw::FW_SERIALIZE_OK,
761  static_cast<AssertArg>(deserStatus)
762  );
763 
764  // Call handler function
765  this->Run_handler(
766  portNum,
767  context
768  );
769 
770  break;
771 
772  }
773 
774  // Handle async input port pingIn
775  case PINGIN_PING: {
776 
777  // Deserialize argument key
778  U32 key;
779  deserStatus = msg.deserialize(key);
780  FW_ASSERT(
781  deserStatus == Fw::FW_SERIALIZE_OK,
782  static_cast<AssertArg>(deserStatus)
783  );
784 
785  // Call handler function
786  this->pingIn_handler(
787  portNum,
788  key
789  );
790 
791  break;
792 
793  }
794 
795  default:
796  return MSG_DISPATCH_ERROR;
797 
798  }
799 
800  return MSG_DISPATCH_OK;
801 
802  }
803 
804 } // end namespace Svc
Svc::InputPingPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: PingPortAc.hpp:30
Svc::TlmChanComponentBase::m_Run_InputPort
Svc::InputSchedPort m_Run_InputPort[NUM_RUN_INPUT_PORTS]
Definition: TlmChanComponentAc.hpp:408
Svc::TlmChanComponentBase::Run_handler
virtual void Run_handler(NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context)=0
Handler for input port Run.
Fw::InputTlmPort
Definition: TlmPortAc.hpp:29
Svc::TlmChanComponentBase::m_p_Run_in
static void m_p_Run_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context)
Definition: TlmChanComponentAc.cpp:512
Svc::TlmChanComponentBase::set_PktSend_OutputPort
void set_PktSend_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputComPort *port)
Definition: TlmChanComponentAc.cpp:117
Fw::InputTlmPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: TlmPortAc.cpp:42
Fw::Time
Definition: Time.hpp:10
Fw::QueuedComponentBase::doDispatch
virtual MsgDispatchStatus doDispatch(void)=0
method to dispatch a single message in the queue.
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
Fw::TlmBuffer
Definition: TlmBuffer.hpp:21
Svc::InputSchedPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: SchedPortAc.cpp:42
FwChanIdType
#define FwChanIdType
Type representation for a channel id.
Definition: FpConfig.hpp:66
Fw::PortBase::isConnected
bool isConnected(void)
Definition: PortBase.cpp:40
Svc::TlmChanComponentBase::getNum_TlmGet_InputPorts
NATIVE_INT_TYPE getNum_TlmGet_InputPorts(void)
Definition: TlmChanComponentAc.cpp:402
FW_NUM_ARRAY_ELEMENTS
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.hpp:103
U8
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.hpp:76
Svc::InputPingPort::init
void init(void)
initialization function
Definition: PingPortAc.cpp:38
Svc::OutputPingPort::init
void init(void)
Definition: PingPortAc.cpp:89
Svc::TlmChanComponentBase::get_TlmGet_InputPort
Fw::InputTlmPort * get_TlmGet_InputPort(NATIVE_INT_TYPE portNum)
Definition: TlmChanComponentAc.cpp:92
Os::Queue::QueueStatus
QueueStatus
Definition: Queue.hpp:27
Fw::QueuedComponentBase::m_queue
Os::Queue m_queue
queue object for active component
Definition: QueuedComponentBase.hpp:36
Svc::TlmChanComponentBase::data
PROTECTED Fw::ComBuffer & data
Definition: TlmChanComponentAc.hpp:286
Svc::TlmChanComponentBase::pingIn_handler
virtual void pingIn_handler(NATIVE_INT_TYPE portNum, U32 key)=0
Handler for input port pingIn.
Svc::TlmChanComponentBase::m_pingOut_OutputPort
Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS]
Definition: TlmChanComponentAc.hpp:426
Svc::TlmChanComponentBase::set_pingOut_OutputPort
void set_pingOut_OutputPort(NATIVE_INT_TYPE portNum, Svc::InputPingPort *port)
Definition: TlmChanComponentAc.cpp:127
Svc::TlmChanComponentBase::timeTag
PROTECTED FwChanIdType Fw::Time & timeTag
Definition: TlmChanComponentAc.hpp:185
Svc::OutputPingPort::invoke
void invoke(U32 key)
Definition: PingPortAc.cpp:103
Svc::InputSchedPort::init
void init(void)
initialization function
Definition: SchedPortAc.cpp:38
Fw::InputTlmPort::init
void init(void)
initialization function
Definition: TlmPortAc.cpp:38
Svc::TlmChanComponentBase::m_p_TlmGet_in
static void m_p_TlmGet_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Definition: TlmChanComponentAc.cpp:499
Svc::TlmChanComponentBase::portNum
PRIVATE NATIVE_INT_TYPE portNum
Definition: TlmChanComponentAc.hpp:438
Svc::InputSchedPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: SchedPortAc.hpp:30
Svc::TlmChanComponentBase::context
PROTECTED NATIVE_UINT_TYPE context
Definition: TlmChanComponentAc.hpp:267
Svc::TlmChanComponentBase::get_TlmRecv_InputPort
Fw::InputTlmPort * get_TlmRecv_InputPort(NATIVE_INT_TYPE portNum)
Definition: TlmChanComponentAc.cpp:85
Assert.hpp
Fw::FW_SERIALIZE_OK
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
Definition: Serializable.hpp:15
Os::Queue::send
QueueStatus send(const Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE priority, QueueBlocking block)
send a message
Definition: QueueCommon.cpp:13
Fw::InputComPort
Definition: ComPortAc.hpp:28
Svc::OutputPingPort::addCallPort
void addCallPort(InputPingPort *callPort)
Definition: PingPortAc.cpp:93
EightyCharString.hpp
Fw::PassiveComponentBase
Definition: PassiveComponentBase.hpp:10
Fw::ObjBase::init
void init(void)
Object initializer.
Definition: ObjBase.cpp:26
Os::Queue::QueueBlocking
QueueBlocking
Definition: Queue.hpp:40
Fw::QueuedComponentBase::MSG_DISPATCH_OK
@ MSG_DISPATCH_OK
Dispatch was normal.
Definition: QueuedComponentBase.hpp:26
Svc::TlmChanComponentBase::pingIn_preMsgHook
virtual void pingIn_preMsgHook(NATIVE_INT_TYPE portNum, U32 key)
Definition: TlmChanComponentAc.cpp:703
BYTE
U8 BYTE
byte type
Definition: BasicTypes.hpp:77
Os::Queue::receive
QueueStatus receive(Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE &priority, QueueBlocking block)
receive a message
Definition: QueueCommon.cpp:22
Svc::TlmChanComponentBase::m_pingIn_InputPort
Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS]
Definition: TlmChanComponentAc.hpp:412
Svc::InputPingPort
Definition: PingPortAc.hpp:27
Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Definition: ActiveComponentBase.hpp:27
Svc::InputSchedPort
Definition: SchedPortAc.hpp:27
Svc::TlmChanComponentBase::get_Run_InputPort
Svc::InputSchedPort * get_Run_InputPort(NATIVE_INT_TYPE portNum)
Definition: TlmChanComponentAc.cpp:99
Fw::QueuedComponentBase::MsgDispatchStatus
MsgDispatchStatus
Definition: QueuedComponentBase.hpp:25
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:30
Svc::TlmChanComponentBase::getNum_pingIn_InputPorts
NATIVE_INT_TYPE getNum_pingIn_InputPorts(void)
Definition: TlmChanComponentAc.cpp:426
port1
BYTE port1[Svc::InputSchedPort::SERIALIZED_SIZE]
Definition: TlmChanComponentAc.cpp:39
FW_ASSERT
#define FW_ASSERT(...)
Definition: Assert.hpp:9
Svc::TlmChanComponentBase
Auto-generated base for TlmChan component.
Definition: TlmChanComponentAc.hpp:36
Fw::QueuedComponentBase::MSG_DISPATCH_ERROR
@ MSG_DISPATCH_ERROR
Errors dispatching messages.
Definition: QueuedComponentBase.hpp:28
Os::Queue::QUEUE_OK
@ QUEUE_OK
message sent/received okay
Definition: Queue.hpp:28
Svc::TlmChanComponentBase::val
PROTECTED FwChanIdType Fw::Time Fw::TlmBuffer & val
Definition: TlmChanComponentAc.hpp:187
Svc::TlmChanComponentBase::m_TlmGet_InputPort
Fw::InputTlmPort m_TlmGet_InputPort[NUM_TLMGET_INPUT_PORTS]
Definition: TlmChanComponentAc.hpp:404
Svc::TlmChanComponentBase::Run_handlerBase
void Run_handlerBase(NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context)
Definition: TlmChanComponentAc.cpp:584
Svc::TlmChanComponentBase::pingIn_handlerBase
void pingIn_handlerBase(NATIVE_INT_TYPE portNum, U32 key)
Definition: TlmChanComponentAc.cpp:637
Svc::TlmChanComponentBase::get_pingIn_InputPort
Svc::InputPingPort * get_pingIn_InputPort(NATIVE_INT_TYPE portNum)
Definition: TlmChanComponentAc.cpp:106
FpConfig.hpp
ISF configuration file.
Fw::InputPortBase::setPortNum
void setPortNum(NATIVE_INT_TYPE portNum)
Definition: InputPortBase.cpp:25
Svc::TlmChanComponentBase::TlmGet_handlerBase
void TlmGet_handlerBase(NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Definition: TlmChanComponentAc.cpp:563
Svc::TlmChanComponentBase::isConnected_pingOut_OutputPort
bool isConnected_pingOut_OutputPort(NATIVE_INT_TYPE portNum)
Definition: TlmChanComponentAc.cpp:456
Svc::TlmChanComponentBase::~TlmChanComponentBase
virtual ~TlmChanComponentBase(void)
Definition: TlmChanComponentAc.cpp:361
Fw::QueuedComponentBase::MSG_DISPATCH_EXIT
@ MSG_DISPATCH_EXIT
A message was sent requesting an exit of the loop.
Definition: QueuedComponentBase.hpp:29
Svc::TlmChanComponentBase::m_p_pingIn_in
static void m_p_pingIn_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, U32 key)
Definition: TlmChanComponentAc.cpp:525
Svc
Definition: ActiveLoggerComponentAc.cpp:22
Os::Queue::QUEUE_NONBLOCKING
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
Definition: Queue.hpp:42
Svc::TlmChanComponentBase::getNum_pingOut_OutputPorts
NATIVE_INT_TYPE getNum_pingOut_OutputPorts(void)
Definition: TlmChanComponentAc.cpp:434
Svc::TlmChanComponentBase::getNum_Run_InputPorts
NATIVE_INT_TYPE getNum_Run_InputPorts(void)
Definition: TlmChanComponentAc.cpp:410
Svc::TlmChanComponentBase::TlmGet_handler
virtual void TlmGet_handler(NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)=0
Handler for input port TlmGet.
Svc::TlmChanComponentBase::unLock
virtual void unLock(void)
Definition: TlmChanComponentAc.cpp:476
Svc::TlmChanComponentBase::pingOut_out
void pingOut_out(NATIVE_INT_TYPE portNum, U32 key)
Definition: TlmChanComponentAc.cpp:380
TlmChanComponentAc.hpp
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
AssertArg
#define AssertArg
Definition: FpConfig.hpp:51
Fw::ComBuffer
Definition: ComBuffer.hpp:21
port2
BYTE port2[Svc::InputPingPort::SERIALIZED_SIZE]
Definition: TlmChanComponentAc.cpp:40
Fw::QueuedComponentBase::createQueue
Os::Queue::QueueStatus createQueue(NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize)
Definition: QueuedComponentBase.cpp:29
Fw
Definition: BufferGetPortAc.cpp:6
Os::Queue::QUEUE_BLOCKING
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
Definition: Queue.hpp:41
Svc::InputPingPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: PingPortAc.cpp:42