forked from nasa/fprime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTlmChanComponentAc.cpp.gcov
596 lines (596 loc) · 24.8 KB
/
TlmChanComponentAc.cpp.gcov
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
-: 0:Source:/home/tim/source/isf/Svc/TlmChan/TlmChanComponentAc.cpp
-: 0:Programs:5
-: 1:// ======================================================================
-: 2:// \title TlmChanComponentAc.hpp
-: 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. Any commercial use must be negotiated with the Office
-: 10:// of Technology Transfer at the California Institute of Technology.
-: 11://
-: 12:// This software may be subject to U.S. export control laws and
-: 13:// regulations. By accepting this document, the user agrees to comply
-: 14:// with all U.S. export laws and regulations. User has the
-: 15:// responsibility to obtain export licenses, or other export authority
-: 16:// as may be required before exporting such information to foreign
-: 17:// countries or providing access to foreign persons.
-: 18:// ======================================================================
-: 19:
-: 20:#include <stdio.h>
-: 21:#include <Fw/Cfg/Config.hpp>
-: 22:#include <Svc/TlmChan/TlmChanComponentAc.hpp>
-: 23:#include <Fw/Types/Assert.hpp>
-: 24:#if FW_ENABLE_TEXT_LOGGING
-: 25:#include <Fw/Types/EightyCharString.hpp>
-: 26:#endif
-: 27:
-: 28:
-: 29:namespace Svc {
-: 30:
-: 31: // ----------------------------------------------------------------------
-: 32: // Anonymous namespace to prevent name collisions
-: 33: // ----------------------------------------------------------------------
-: 34:
-: 35: namespace {
-: 36:
-: 37: typedef enum {
-: 38: TLMCHAN_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
-: 39: RUN_SCHED
-: 40: } MsgTypeEnum;
-: 41:
-: 42: // Get the max size by doing a union of the input port serialization sizes.
-: 43:
-: 44: typedef union {
-: 45: BYTE port1[Svc::InputSchedPort::SERIALIZED_SIZE];
-: 46: } BuffUnion;
-: 47:
-: 48: // Define a message buffer class large enough to handle all the
-: 49: // asynchronous inputs to the component
-: 50:
12: 51: class ComponentIpcSerializableBuffer :
-: 52: public Fw::SerializeBufferBase
-: 53: {
-: 54:
-: 55: public:
-: 56:
-: 57: enum {
-: 58: // Max. message size = size of data + message id + port
-: 59: SERIALIZATION_SIZE =
-: 60: sizeof(BuffUnion) +
-: 61: sizeof(NATIVE_INT_TYPE) +
-: 62: sizeof(NATIVE_INT_TYPE)
-: 63: };
-: 64:
15: 65: NATIVE_UINT_TYPE getBuffCapacity(void) const {
15: 66: return sizeof(m_buff);
-: 67: }
-: 68:
93: 69: U8* getBuffAddr(void) {
93: 70: return m_buff;
-: 71: }
-: 72:
3: 73: const U8* getBuffAddr(void) const {
3: 74: return m_buff;
-: 75: }
-: 76:
-: 77: private:
-: 78: // Should be the max of all the input ports serialized sizes...
-: 79: U8 m_buff[SERIALIZATION_SIZE];
-: 80:
-: 81: };
-: 82:
-: 83: }
-: 84:
-: 85: // ----------------------------------------------------------------------
-: 86: // Getters for numbers of input ports
-: 87: // ----------------------------------------------------------------------
-: 88:
4: 89: Fw::InputTlmPort *TlmChanComponentBase ::
-: 90: get_TlmRecv_InputPort(NATIVE_INT_TYPE portNum)
-: 91: {
4: 92: FW_ASSERT(portNum < this->getNum_TlmRecv_InputPorts(),static_cast<AssertArg>(portNum));
4: 93: return &this->m_TlmRecv_InputPort[portNum];
-: 94: }
-: 95:
4: 96: Fw::InputTlmPort *TlmChanComponentBase ::
-: 97: get_TlmGet_InputPort(NATIVE_INT_TYPE portNum)
-: 98: {
4: 99: FW_ASSERT(portNum < this->getNum_TlmGet_InputPorts(),static_cast<AssertArg>(portNum));
4: 100: return &this->m_TlmGet_InputPort[portNum];
-: 101: }
-: 102:
4: 103: Svc::InputSchedPort *TlmChanComponentBase ::
-: 104: get_Run_InputPort(NATIVE_INT_TYPE portNum)
-: 105: {
4: 106: FW_ASSERT(portNum < this->getNum_Run_InputPorts(),static_cast<AssertArg>(portNum));
4: 107: return &this->m_Run_InputPort[portNum];
-: 108: }
-: 109:
-: 110: // ----------------------------------------------------------------------
-: 111: // Typed connectors for output ports
-: 112: // ----------------------------------------------------------------------
-: 113:
4: 114: void TlmChanComponentBase ::
-: 115: set_PktSend_OutputPort(
-: 116: NATIVE_INT_TYPE portNum,
-: 117: Fw::InputComPort* port
-: 118: )
-: 119: {
4: 120: FW_ASSERT(portNum < this->getNum_PktSend_OutputPorts(),static_cast<AssertArg>(portNum));
4: 121: this->m_PktSend_OutputPort[portNum].addCallPort(port);
4: 122: }
-: 123:
-: 124: // ----------------------------------------------------------------------
-: 125: // Serialization connectors for output ports
-: 126: // ----------------------------------------------------------------------
-: 127:
-: 128:#if FW_PORT_SERIALIZATION
-: 129:
#####: 130: void TlmChanComponentBase ::
-: 131: set_PktSend_OutputPort(
-: 132: NATIVE_INT_TYPE portNum,
-: 133: Fw::InputSerializePort *port
-: 134: )
-: 135: {
#####: 136: FW_ASSERT(portNum < this->getNum_PktSend_OutputPorts(),static_cast<AssertArg>(portNum));
#####: 137: return this->m_PktSend_OutputPort[portNum].registerSerialPort(port);
-: 138: }
-: 139:
-: 140:#endif
-: 141:
-: 142: // ----------------------------------------------------------------------
-: 143: // Component construction, initialization, and destruction
-: 144: // ----------------------------------------------------------------------
-: 145:
4: 146: TlmChanComponentBase ::
-: 147:#if FW_OBJECT_NAMES == 1
-: 148: TlmChanComponentBase(const char* compName) :
4: 149: Fw::ActiveComponentBase(compName)
-: 150:#else
-: 151: TlmChanComponentBase() :
-: 152: Fw::ActiveComponentBase()
-: 153:#endif
-: 154: {
-: 155:
4: 156: }
-: 157:
4: 158: void TlmChanComponentBase ::
-: 159: init(
-: 160: NATIVE_INT_TYPE queueDepth,
-: 161: NATIVE_INT_TYPE instance
-: 162: )
-: 163: {
-: 164:
-: 165: // Initialize base class
4: 166: Fw::ActiveComponentBase::init(instance);
-: 167:
-: 168: // Connect input port TlmRecv
16: 169: for (
4: 170: NATIVE_INT_TYPE port = 0;
8: 171: port < this->getNum_TlmRecv_InputPorts();
-: 172: port++
-: 173: ) {
-: 174:
4: 175: this->m_TlmRecv_InputPort[port].init();
-: 176: this->m_TlmRecv_InputPort[port].addCallComp(
-: 177: this,
-: 178: m_p_TlmRecv_in
4: 179: );
4: 180: this->m_TlmRecv_InputPort[port].setPortNum(port);
-: 181:
-: 182:#if FW_OBJECT_NAMES == 1
-: 183: char portName[80];
-: 184: (void) snprintf(
-: 185: portName,
-: 186: sizeof(portName),
-: 187: "%s_TlmRecv_InputPort[%d]",
-: 188: this->m_objName,
-: 189: port
4: 190: );
4: 191: this->m_TlmRecv_InputPort[port].setObjName(portName);
-: 192:#endif
-: 193:
-: 194: }
-: 195:
-: 196: // Connect input port TlmGet
16: 197: for (
4: 198: NATIVE_INT_TYPE port = 0;
8: 199: port < this->getNum_TlmGet_InputPorts();
-: 200: port++
-: 201: ) {
-: 202:
4: 203: this->m_TlmGet_InputPort[port].init();
-: 204: this->m_TlmGet_InputPort[port].addCallComp(
-: 205: this,
-: 206: m_p_TlmGet_in
4: 207: );
4: 208: this->m_TlmGet_InputPort[port].setPortNum(port);
-: 209:
-: 210:#if FW_OBJECT_NAMES == 1
-: 211: char portName[80];
-: 212: (void) snprintf(
-: 213: portName,
-: 214: sizeof(portName),
-: 215: "%s_TlmGet_InputPort[%d]",
-: 216: this->m_objName,
-: 217: port
4: 218: );
4: 219: this->m_TlmGet_InputPort[port].setObjName(portName);
-: 220:#endif
-: 221:
-: 222: }
-: 223:
-: 224: // Connect input port Run
16: 225: for (
4: 226: NATIVE_INT_TYPE port = 0;
8: 227: port < this->getNum_Run_InputPorts();
-: 228: port++
-: 229: ) {
-: 230:
4: 231: this->m_Run_InputPort[port].init();
-: 232: this->m_Run_InputPort[port].addCallComp(
-: 233: this,
-: 234: m_p_Run_in
4: 235: );
4: 236: this->m_Run_InputPort[port].setPortNum(port);
-: 237:
-: 238:#if FW_OBJECT_NAMES == 1
-: 239: char portName[80];
-: 240: (void) snprintf(
-: 241: portName,
-: 242: sizeof(portName),
-: 243: "%s_Run_InputPort[%d]",
-: 244: this->m_objName,
-: 245: port
4: 246: );
4: 247: this->m_Run_InputPort[port].setObjName(portName);
-: 248:#endif
-: 249:
-: 250: }
-: 251:
-: 252: // Initialize output port PktSend
16: 253: for (
4: 254: NATIVE_INT_TYPE port = 0;
8: 255: port < this->getNum_PktSend_OutputPorts();
-: 256: port++
-: 257: ) {
4: 258: this->m_PktSend_OutputPort[port].init();
-: 259:
-: 260:#if FW_OBJECT_NAMES == 1
-: 261: char portName[80];
-: 262: (void) snprintf(
-: 263: portName,
-: 264: sizeof(portName),
-: 265: "%s_PktSend_OutputPort[%d]",
-: 266: this->m_objName,
-: 267: port
4: 268: );
4: 269: this->m_PktSend_OutputPort[port].setObjName(portName);
-: 270:#endif
-: 271:
-: 272: }
-: 273:
-: 274: Os::Queue::QueueStatus qStat =
-: 275: this->createQueue(
-: 276: queueDepth,
-: 277: ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
4: 278: );
-: 279: FW_ASSERT(
-: 280: Os::Queue::QUEUE_OK == qStat,
-: 281: static_cast<AssertArg>(qStat)
4: 282: );
-: 283:
4: 284: }
-: 285:
4: 286: TlmChanComponentBase::
4: 287: ~TlmChanComponentBase() {
-: 288:
4: 289: }
-: 290:
-: 291: // ----------------------------------------------------------------------
-: 292: // Invocation functions for output ports
-: 293: // ----------------------------------------------------------------------
-: 294:
23: 295: void TlmChanComponentBase ::
-: 296: PktSend_out(
-: 297: NATIVE_INT_TYPE portNum,
-: 298: Fw::ComBuffer &data, U32 context
-: 299: )
-: 300: {
23: 301: FW_ASSERT(portNum < this->getNum_PktSend_OutputPorts(),static_cast<AssertArg>(portNum));
23: 302: m_PktSend_OutputPort[portNum].invoke(data, context);
23: 303: }
-: 304:
-: 305: // ----------------------------------------------------------------------
-: 306: // Getters for numbers of ports
-: 307: // ----------------------------------------------------------------------
-: 308:
86: 309: NATIVE_INT_TYPE TlmChanComponentBase ::
-: 310: getNum_TlmRecv_InputPorts(void)
-: 311: {
86: 312: return (NATIVE_INT_TYPE) FW_NUM_ARRAY_ELEMENTS(
-: 313: this->m_TlmRecv_InputPort
-: 314: );
-: 315: }
-: 316:
87: 317: NATIVE_INT_TYPE TlmChanComponentBase ::
-: 318: getNum_TlmGet_InputPorts(void)
-: 319: {
87: 320: return (NATIVE_INT_TYPE) FW_NUM_ARRAY_ELEMENTS(
-: 321: this->m_TlmGet_InputPort
-: 322: );
-: 323: }
-: 324:
15: 325: NATIVE_INT_TYPE TlmChanComponentBase ::
-: 326: getNum_Run_InputPorts(void)
-: 327: {
15: 328: return (NATIVE_INT_TYPE) FW_NUM_ARRAY_ELEMENTS(
-: 329: this->m_Run_InputPort
-: 330: );
-: 331: }
-: 332:
38: 333: NATIVE_INT_TYPE TlmChanComponentBase ::
-: 334: getNum_PktSend_OutputPorts(void)
-: 335: {
38: 336: return (NATIVE_INT_TYPE) FW_NUM_ARRAY_ELEMENTS(
-: 337: this->m_PktSend_OutputPort
-: 338: );
-: 339: }
-: 340:
-: 341: // ----------------------------------------------------------------------
-: 342: // Port connection status queries
-: 343: // ----------------------------------------------------------------------
-: 344:
3: 345: bool TlmChanComponentBase ::
-: 346: isConnected_PktSend_OutputPort(NATIVE_INT_TYPE portNum)
-: 347: {
3: 348: FW_ASSERT(
-: 349: portNum < this->getNum_PktSend_OutputPorts(),
-: 350: static_cast<AssertArg>(portNum)
3: 351: );
3: 352: return this->m_PktSend_OutputPort[portNum].isConnected();
-: 353: }
-: 354:
-: 355: // ----------------------------------------------------------------------
-: 356: // Mutex functions for guarded ports
-: 357: // ----------------------------------------------------------------------
-: 358:
152: 359: void TlmChanComponentBase ::
-: 360: lock(void)
-: 361: {
152: 362: this->m_guardedPortMutex.lock();
152: 363: }
-: 364:
152: 365: void TlmChanComponentBase ::
-: 366: unLock(void)
-: 367: {
152: 368: this->m_guardedPortMutex.unLock();
152: 369: }
-: 370:
-: 371: // ----------------------------------------------------------------------
-: 372: // Calls for messages received on typed input ports
-: 373: // ----------------------------------------------------------------------
-: 374:
74: 375: void TlmChanComponentBase ::
-: 376: m_p_TlmRecv_in(
-: 377: Fw::PassiveComponentBase* callComp,
-: 378: NATIVE_INT_TYPE portNum,
-: 379: FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val
-: 380: )
-: 381: {
74: 382: FW_ASSERT(callComp);
-: 383: TlmChanComponentBase* compPtr =
74: 384: (TlmChanComponentBase*) callComp;
74: 385: compPtr->TlmRecv_handlerBase(portNum, id, timeTag, val);
74: 386: }
-: 387:
75: 388: void TlmChanComponentBase ::
-: 389: m_p_TlmGet_in(
-: 390: Fw::PassiveComponentBase* callComp,
-: 391: NATIVE_INT_TYPE portNum,
-: 392: FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val
-: 393: )
-: 394: {
75: 395: FW_ASSERT(callComp);
-: 396: TlmChanComponentBase* compPtr =
75: 397: (TlmChanComponentBase*) callComp;
75: 398: compPtr->TlmGet_handlerBase(portNum, id, timeTag, val);
75: 399: }
-: 400:
3: 401: void TlmChanComponentBase ::
-: 402: m_p_Run_in(
-: 403: Fw::PassiveComponentBase* callComp,
-: 404: NATIVE_INT_TYPE portNum,
-: 405: NATIVE_UINT_TYPE context
-: 406: )
-: 407: {
3: 408: FW_ASSERT(callComp);
-: 409: TlmChanComponentBase* compPtr =
3: 410: (TlmChanComponentBase*) callComp;
3: 411: compPtr->Run_handlerBase(portNum, context);
3: 412: }
-: 413:
-: 414: // ----------------------------------------------------------------------
-: 415: // Port handler base-class functions for typed input ports
-: 416: // ----------------------------------------------------------------------
-: 417:
74: 418: void TlmChanComponentBase ::
-: 419: TlmRecv_handlerBase(
-: 420: NATIVE_INT_TYPE portNum,
-: 421: FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val
-: 422: )
-: 423: {
-: 424:
-: 425: // Make sure port number is valid
74: 426: FW_ASSERT(portNum < this->getNum_TlmRecv_InputPorts(),static_cast<AssertArg>(portNum));
-: 427:
-: 428: // Lock guard mutex before calling
74: 429: this->lock();
-: 430:
-: 431: // Down call to pure virtual handler method implemented in Impl class
74: 432: this->TlmRecv_handler(portNum, id, timeTag, val);
-: 433:
-: 434: // Unlock guard mutex
74: 435: this->unLock();
-: 436:
74: 437: }
-: 438:
75: 439: void TlmChanComponentBase ::
-: 440: TlmGet_handlerBase(
-: 441: NATIVE_INT_TYPE portNum,
-: 442: FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val
-: 443: )
-: 444: {
-: 445:
-: 446: // Make sure port number is valid
75: 447: FW_ASSERT(portNum < this->getNum_TlmGet_InputPorts(),static_cast<AssertArg>(portNum));
-: 448:
-: 449: // Lock guard mutex before calling
75: 450: this->lock();
-: 451:
-: 452: // Down call to pure virtual handler method implemented in Impl class
75: 453: this->TlmGet_handler(portNum, id, timeTag, val);
-: 454:
-: 455: // Unlock guard mutex
75: 456: this->unLock();
-: 457:
75: 458: }
-: 459:
3: 460: void TlmChanComponentBase ::
-: 461: Run_handlerBase(
-: 462: NATIVE_INT_TYPE portNum,
-: 463: NATIVE_UINT_TYPE context
-: 464: )
-: 465: {
-: 466:
-: 467: // Make sure port number is valid
3: 468: FW_ASSERT(portNum < this->getNum_Run_InputPorts(),static_cast<AssertArg>(portNum));
-: 469:
-: 470: // Call pre-message hook
-: 471: Run_preMsgHook(
-: 472: portNum,
-: 473: context
3: 474: );
-: 475:
3: 476: ComponentIpcSerializableBuffer msg;
-: 477: Fw::SerializeStatus _status;
-: 478:
-: 479: _status = msg.serialize(
-: 480: static_cast<NATIVE_INT_TYPE>(RUN_SCHED)
3: 481: );
-: 482: FW_ASSERT (
-: 483: _status == Fw::FW_SERIALIZE_OK,
-: 484: static_cast<AssertArg>(_status)
3: 485: );
-: 486:
3: 487: _status = msg.serialize(portNum);
-: 488: FW_ASSERT (
-: 489: _status == Fw::FW_SERIALIZE_OK,
-: 490: static_cast<AssertArg>(_status)
3: 491: );
-: 492:
-: 493: // Serialize argument context
3: 494: _status = msg.serialize(context);
-: 495: FW_ASSERT(
-: 496: _status == Fw::FW_SERIALIZE_OK,
-: 497: static_cast<AssertArg>(_status)
3: 498: );
-: 499:
-: 500: Os::Queue::QueueStatus qStatus =
3: 501: this->m_queue.send(msg, 0);
-: 502: FW_ASSERT(
-: 503: qStatus == Os::Queue::QUEUE_OK,
-: 504: static_cast<AssertArg>(qStatus)
3: 505: );
3: 506: }
-: 507:
-: 508: // ----------------------------------------------------------------------
-: 509: // Pre-message hooks for async input ports
-: 510: // ----------------------------------------------------------------------
-: 511:
3: 512: void TlmChanComponentBase ::
-: 513: Run_preMsgHook(
-: 514: NATIVE_INT_TYPE portNum,
-: 515: NATIVE_UINT_TYPE context
-: 516: )
-: 517: {
-: 518: // Default: no-op
3: 519: }
-: 520:
-: 521: // ----------------------------------------------------------------------
-: 522: // Message dispatch method for active and queued components. Called
-: 523: // by active component thread or implementation code for queued components
-: 524: // ----------------------------------------------------------------------
-: 525:
3: 526: Fw::QueuedComponentBase::MsgDispatchStatus TlmChanComponentBase ::
-: 527: doDispatch(void)
-: 528: {
-: 529:
3: 530: ComponentIpcSerializableBuffer msg;
-: 531: NATIVE_INT_TYPE priority;
-: 532:
3: 533: Os::Queue::QueueStatus msgStatus = this->m_queue.receive(msg,priority);
-: 534: FW_ASSERT(
-: 535: msgStatus == Os::Queue::QUEUE_OK,
-: 536: static_cast<AssertArg>(msgStatus)
3: 537: );
-: 538:
-: 539: // Reset to beginning of buffer
3: 540: msg.resetDeser();
-: 541:
-: 542: NATIVE_INT_TYPE desMsg;
3: 543: Fw::SerializeStatus deserStatus = msg.deserialize(desMsg);
-: 544: FW_ASSERT(
-: 545: deserStatus == Fw::FW_SERIALIZE_OK,
-: 546: static_cast<AssertArg>(deserStatus)
3: 547: );
-: 548:
3: 549: MsgTypeEnum msgType = static_cast<MsgTypeEnum>(desMsg);
-: 550:
3: 551: if (msgType == TLMCHAN_COMPONENT_EXIT) {
#####: 552: return MSG_DISPATCH_EXIT;
-: 553: }
-: 554:
-: 555: NATIVE_INT_TYPE portNum;
3: 556: deserStatus = msg.deserialize(portNum);
-: 557: FW_ASSERT(
-: 558: deserStatus == Fw::FW_SERIALIZE_OK,
-: 559: static_cast<AssertArg>(deserStatus)
3: 560: );
-: 561:
3: 562: switch (msgType) {
-: 563:
-: 564: // Handle async input port Run
-: 565: case RUN_SCHED: {
-: 566:
-: 567: // Deserialize argument context
-: 568: NATIVE_UINT_TYPE context;
3: 569: deserStatus = msg.deserialize(context);
-: 570: FW_ASSERT(
-: 571: deserStatus == Fw::FW_SERIALIZE_OK,
-: 572: static_cast<AssertArg>(deserStatus)
3: 573: );
-: 574:
-: 575: // Call handler function
-: 576: this->Run_handler(
-: 577: portNum,
-: 578: context
3: 579: );
-: 580:
3: 581: break;
-: 582:
-: 583: }
-: 584:
-: 585: default:
#####: 586: return MSG_DISPATCH_ERROR;
-: 587:
-: 588: }
-: 589:
6: 590: return MSG_DISPATCH_OK;
-: 591:
-: 592: }
-: 593:
-: 594:} // end namespace Svc