aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/epl/EplNmtCnu.c
blob: 7effc7c2cc892a8fc1eb9db03ff1db3ee1513e12 (plain)
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
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
/****************************************************************************

  (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
      www.systec-electronic.com

  Project:      openPOWERLINK

  Description:  source file for NMT-CN-Userspace-Module

  License:

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:

    1. Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

    3. Neither the name of SYSTEC electronic GmbH nor the names of its
       contributors may be used to endorse or promote products derived
       from this software without prior written permission. For written
       permission, please contact info@systec-electronic.com.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
    ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    POSSIBILITY OF SUCH DAMAGE.

    Severability Clause:

        If a provision of this License is or becomes illegal, invalid or
        unenforceable in any jurisdiction, that shall not affect:
        1. the validity or enforceability in that jurisdiction of any other
           provision of this License; or
        2. the validity or enforceability in other jurisdictions of that or
           any other provision of this License.

  -------------------------------------------------------------------------

                $RCSfile: EplNmtCnu.c,v $

                $Author: D.Krueger $

                $Revision: 1.6 $  $Date: 2008/10/17 15:32:32 $

                $State: Exp $

                Build Environment:
                    GCC V3.4

  -------------------------------------------------------------------------

  Revision History:

  2006/06/09 k.t.:   start of the implementation

****************************************************************************/

#include "EplInc.h"
#include "user/EplNmtCnu.h"
#include "user/EplDlluCal.h"

#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_CN)) != 0)

/***************************************************************************/
/*                                                                         */
/*                                                                         */
/*          G L O B A L   D E F I N I T I O N S                            */
/*                                                                         */
/*                                                                         */
/***************************************************************************/

//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
// local types
//---------------------------------------------------------------------------

typedef struct
{
    unsigned int                m_uiNodeId;
    tEplNmtuCheckEventCallback  m_pfnCheckEventCb;

} tEplNmtCnuInstance;

//---------------------------------------------------------------------------
// modul globale vars
//---------------------------------------------------------------------------

static tEplNmtCnuInstance   EplNmtCnuInstance_g;

//---------------------------------------------------------------------------
// local function prototypes
//---------------------------------------------------------------------------

static tEplNmtCommand EplNmtCnuGetNmtCommand(tEplFrameInfo * pFrameInfo_p);

static BOOL EplNmtCnuNodeIdList(BYTE* pbNmtCommandDate_p);

static tEplKernel PUBLIC EplNmtCnuCommandCb(tEplFrameInfo * pFrameInfo_p);



//=========================================================================//
//                                                                         //
//          P U B L I C   F U N C T I O N S                                //
//                                                                         //
//=========================================================================//

//---------------------------------------------------------------------------
//
// Function:    EplNmtCnuInit
//
// Description: init the first instance of the module
//
//
//
// Parameters:      uiNodeId_p = NodeId of the local node
//
//
// Returns:         tEplKernel = errorcode
//
//
// State:
//
//---------------------------------------------------------------------------
EPLDLLEXPORT tEplKernel PUBLIC EplNmtCnuInit(unsigned int uiNodeId_p)
{
tEplKernel Ret;

    Ret = EplNmtCnuAddInstance(uiNodeId_p);

    return Ret;
}

//---------------------------------------------------------------------------
//
// Function:    EplNmtCnuAddInstance
//
// Description: init the add new instance of the module
//
//
//
// Parameters:      uiNodeId_p = NodeId of the local node
//
//
// Returns:         tEplKernel = errorcode
//
//
// State:
//
//---------------------------------------------------------------------------
EPLDLLEXPORT tEplKernel PUBLIC EplNmtCnuAddInstance(unsigned int uiNodeId_p)
{
tEplKernel Ret;

    Ret = kEplSuccessful;

    // reset instance structure
    EPL_MEMSET(&EplNmtCnuInstance_g, 0, sizeof (EplNmtCnuInstance_g));

    // save nodeid
    EplNmtCnuInstance_g.m_uiNodeId = uiNodeId_p;

    // register callback-function for NMT-commands
#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLU)) != 0)
    Ret = EplDlluCalRegAsndService(kEplDllAsndNmtCommand,
                                   EplNmtCnuCommandCb,
                                   kEplDllAsndFilterLocal);
#endif


    return Ret;

}

//---------------------------------------------------------------------------
//
// Function:    EplNmtCnuDelInstance
//
// Description: delte instance of the module
//
//
//
// Parameters:
//
//
// Returns:         tEplKernel = errorcode
//
//
// State:
//
//---------------------------------------------------------------------------
EPLDLLEXPORT tEplKernel PUBLIC EplNmtCnuDelInstance()
{
tEplKernel Ret;

    Ret = kEplSuccessful;

#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLU)) != 0)
    // deregister callback function from DLL
    Ret = EplDlluCalRegAsndService(kEplDllAsndNmtCommand,
                                   NULL,
                                   kEplDllAsndFilterNone);
#endif

    return Ret;
}

//---------------------------------------------------------------------------
//
// Function:    EplNmtCnuSendNmtRequest
//
// Description: Send an NMT-Request to the MN
//
//
//
// Parameters:      uiNodeId_p = NodeId of the local node
//                  NmtCommand_p = requested NMT-Command
//
//
// Returns:         tEplKernel = errorcode
//
//
// State:
//
//---------------------------------------------------------------------------
EPLDLLEXPORT tEplKernel PUBLIC EplNmtCnuSendNmtRequest(
                                    unsigned int uiNodeId_p,
                                    tEplNmtCommand NmtCommand_p)
{
tEplKernel      Ret;
tEplFrameInfo   NmtRequestFrameInfo;
tEplFrame       NmtRequestFrame;


    Ret = kEplSuccessful;

    // build frame
    EPL_MEMSET(&NmtRequestFrame.m_be_abDstMac[0], 0x00, sizeof(NmtRequestFrame.m_be_abDstMac)); // set by DLL
    EPL_MEMSET(&NmtRequestFrame.m_be_abSrcMac[0], 0x00, sizeof(NmtRequestFrame.m_be_abSrcMac)); // set by DLL
    AmiSetWordToBe(&NmtRequestFrame.m_be_wEtherType, EPL_C_DLL_ETHERTYPE_EPL);
    AmiSetByteToLe(&NmtRequestFrame.m_le_bDstNodeId, (BYTE) EPL_C_ADR_MN_DEF_NODE_ID); // node id of the MN
    AmiSetByteToLe(&NmtRequestFrame.m_le_bMessageType, (BYTE)kEplMsgTypeAsnd);
    AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_le_bServiceId, (BYTE) kEplDllAsndNmtRequest);
    AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_Payload.m_NmtRequestService.m_le_bNmtCommandId,
        (BYTE)NmtCommand_p);
    AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_Payload.m_NmtRequestService.m_le_bTargetNodeId,
        (BYTE)uiNodeId_p); // target for the nmt command
    EPL_MEMSET(&NmtRequestFrame.m_Data.m_Asnd.m_Payload.m_NmtRequestService.m_le_abNmtCommandData[0], 0x00, sizeof(NmtRequestFrame.m_Data.m_Asnd.m_Payload.m_NmtRequestService.m_le_abNmtCommandData));



    // build info-structure
    NmtRequestFrameInfo.m_NetTime.m_dwNanoSec = 0;
    NmtRequestFrameInfo.m_NetTime.m_dwSec = 0;
    NmtRequestFrameInfo.m_pFrame = &NmtRequestFrame;
    NmtRequestFrameInfo.m_uiFrameSize = EPL_C_DLL_MINSIZE_NMTREQ; // sizeof(NmtRequestFrame);

    // send NMT-Request
#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLU)) != 0)
    Ret = EplDlluCalAsyncSend(&NmtRequestFrameInfo,    // pointer to frameinfo
                           kEplDllAsyncReqPrioNmt); // priority
#endif


    return Ret;
}


//---------------------------------------------------------------------------
//
// Function:    EplNmtCnuRegisterStateChangeCb
//
// Description: register Callback-function go get informed about a
//              NMT-Change-State-Event
//
//
//
// Parameters:  pfnEplNmtStateChangeCb_p = functionpointer
//
//
// Returns:     tEplKernel  = errorcode
//
//
// State:
//
//---------------------------------------------------------------------------

EPLDLLEXPORT tEplKernel PUBLIC EplNmtCnuRegisterCheckEventCb(
            tEplNmtuCheckEventCallback pfnEplNmtCheckEventCb_p)
{
tEplKernel Ret;

    Ret = kEplSuccessful;

    // save callback-function in modul global var
    EplNmtCnuInstance_g.m_pfnCheckEventCb = pfnEplNmtCheckEventCb_p;

    return Ret;

}

//=========================================================================//
//                                                                         //
//          P R I V A T E   F U N C T I O N S                              //
//                                                                         //
//=========================================================================//


//---------------------------------------------------------------------------
//
// Function:    EplNmtCnuCommandCb
//
// Description: callback funktion for NMT-Commands
//
//
//
// Parameters:      pFrameInfo_p = Frame with the NMT-Commando
//
//
// Returns:         tEplKernel = errorcode
//
//
// State:
//
//---------------------------------------------------------------------------
static tEplKernel PUBLIC EplNmtCnuCommandCb(tEplFrameInfo * pFrameInfo_p)
{
tEplKernel      Ret = kEplSuccessful;
tEplNmtCommand  NmtCommand;
BOOL            fNodeIdInList;
tEplNmtEvent    NmtEvent = kEplNmtEventNoEvent;


    if(pFrameInfo_p == NULL)
    {
        Ret = kEplNmtInvalidFramePointer;
        goto Exit;
    }

    NmtCommand = EplNmtCnuGetNmtCommand(pFrameInfo_p);

    // check NMT-Command
    switch(NmtCommand)
    {

        //------------------------------------------------------------------------
        // plain NMT state commands
        case kEplNmtCmdStartNode:
        {   // send NMT-Event to state maschine kEplNmtEventStartNode
            NmtEvent = kEplNmtEventStartNode;
            break;
        }

        case kEplNmtCmdStopNode:
        {   // send NMT-Event to state maschine kEplNmtEventStopNode
            NmtEvent = kEplNmtEventStopNode;
            break;
        }

        case kEplNmtCmdEnterPreOperational2:
        {   // send NMT-Event to state maschine kEplNmtEventEnterPreOperational2
            NmtEvent = kEplNmtEventEnterPreOperational2;
            break;
        }

        case kEplNmtCmdEnableReadyToOperate:
        {   // send NMT-Event to state maschine kEplNmtEventEnableReadyToOperate
            NmtEvent = kEplNmtEventEnableReadyToOperate;
            break;
        }

        case kEplNmtCmdResetNode:
        {   // send NMT-Event to state maschine kEplNmtEventResetNode
            NmtEvent = kEplNmtEventResetNode;
            break;
        }

        case kEplNmtCmdResetCommunication:
        {   // send NMT-Event to state maschine kEplNmtEventResetCom
            NmtEvent = kEplNmtEventResetCom;
            break;
        }

        case kEplNmtCmdResetConfiguration:
        {   // send NMT-Event to state maschine kEplNmtEventResetConfig
            NmtEvent = kEplNmtEventResetConfig;
            break;
        }

        case kEplNmtCmdSwReset:
        {   // send NMT-Event to state maschine kEplNmtEventSwReset
            NmtEvent = kEplNmtEventSwReset;
            break;
        }

        //------------------------------------------------------------------------
        // extended NMT state commands

        case kEplNmtCmdStartNodeEx:
        {
            // check if own nodeid is in EPL node list
            fNodeIdInList = EplNmtCnuNodeIdList(&(pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.m_le_abNmtCommandData[0]));
            if(fNodeIdInList != FALSE)
            {   // own nodeid in list
                // send event to process command
                NmtEvent = kEplNmtEventStartNode;
            }
            break;
        }

        case kEplNmtCmdStopNodeEx:
        {   // check if own nodeid is in EPL node list
            fNodeIdInList = EplNmtCnuNodeIdList(&pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.m_le_abNmtCommandData[0]);
            if(fNodeIdInList != FALSE)
            {   // own nodeid in list
                // send event to process command
                NmtEvent = kEplNmtEventStopNode;
            }
            break;
        }

        case kEplNmtCmdEnterPreOperational2Ex:
        {   // check if own nodeid is in EPL node list
            fNodeIdInList = EplNmtCnuNodeIdList(&pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.m_le_abNmtCommandData[0]);
            if(fNodeIdInList != FALSE)
            {   // own nodeid in list
                // send event to process command
                NmtEvent = kEplNmtEventEnterPreOperational2;
            }
            break;
        }

        case kEplNmtCmdEnableReadyToOperateEx:
        {   // check if own nodeid is in EPL node list
            fNodeIdInList = EplNmtCnuNodeIdList(&pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.m_le_abNmtCommandData[0]);
            if(fNodeIdInList != FALSE)
            {   // own nodeid in list
                // send event to process command
                NmtEvent = kEplNmtEventEnableReadyToOperate;
            }
            break;
        }

        case kEplNmtCmdResetNodeEx:
        {// check if own nodeid is in EPL node list
            fNodeIdInList = EplNmtCnuNodeIdList(&pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.m_le_abNmtCommandData[0]);
            if(fNodeIdInList != FALSE)
            {   // own nodeid in list
                // send event to process command
                NmtEvent = kEplNmtEventResetNode;
            }
            break;
        }

        case kEplNmtCmdResetCommunicationEx:
        {   // check if own nodeid is in EPL node list
            fNodeIdInList = EplNmtCnuNodeIdList(&pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.m_le_abNmtCommandData[0]);
            if(fNodeIdInList != FALSE)
            {   // own nodeid in list
                // send event to process command
                NmtEvent = kEplNmtEventResetCom;
            }
            break;
        }

        case kEplNmtCmdResetConfigurationEx:
        {   // check if own nodeid is in EPL node list
            fNodeIdInList = EplNmtCnuNodeIdList(&pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.m_le_abNmtCommandData[0]);
            if(fNodeIdInList != FALSE)
            {   // own nodeid in list
                // send event to process command
                NmtEvent = kEplNmtEventResetConfig;
            }
            break;
        }

        case kEplNmtCmdSwResetEx:
        {   // check if own nodeid is in EPL node list
            fNodeIdInList = EplNmtCnuNodeIdList(&pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.m_le_abNmtCommandData[0]);
            if(fNodeIdInList != FALSE)
            {   // own nodeid in list
                // send event to process command
                NmtEvent = kEplNmtEventSwReset;
            }
            break;
        }

        //------------------------------------------------------------------------
        // NMT managing commands

        // TODO: add functions to process managing command (optional)

        case kEplNmtCmdNetHostNameSet:
        {
            break;
        }

        case kEplNmtCmdFlushArpEntry:
        {
            break;
        }

        //------------------------------------------------------------------------
        // NMT info services

        // TODO: forward event with infos to the application (optional)

        case kEplNmtCmdPublishConfiguredCN:
        {
            break;
        }

        case kEplNmtCmdPublishActiveCN:
        {
            break;
        }

        case kEplNmtCmdPublishPreOperational1:
        {
            break;
        }

        case kEplNmtCmdPublishPreOperational2:
        {
            break;
        }

        case kEplNmtCmdPublishReadyToOperate:
        {
            break;
        }

        case kEplNmtCmdPublishOperational:
        {
            break;
        }

        case kEplNmtCmdPublishStopped:
        {
            break;
        }

        case kEplNmtCmdPublishEmergencyNew:
        {
            break;
        }

        case kEplNmtCmdPublishTime:
        {
            break;
        }

        //-----------------------------------------------------------------------
        // error from MN
        // -> requested command not supported by MN
        case kEplNmtCmdInvalidService:
        {

            // TODO: errorevent to application
            break;
        }

        //------------------------------------------------------------------------
        // default
        default:
        {
            Ret = kEplNmtUnknownCommand;
            goto Exit;
        }

    }// end of switch(NmtCommand)

    if (NmtEvent != kEplNmtEventNoEvent)
    {
        if (EplNmtCnuInstance_g.m_pfnCheckEventCb != NULL)
        {
            Ret = EplNmtCnuInstance_g.m_pfnCheckEventCb(NmtEvent);
            if (Ret == kEplReject)
            {
                Ret = kEplSuccessful;
                goto Exit;
            }
            else if (Ret != kEplSuccessful)
            {
                goto Exit;
            }
        }
#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMTU)) != 0)
        Ret = EplNmtuNmtEvent(NmtEvent);
#endif
    }

Exit:
    return Ret;

}

//---------------------------------------------------------------------------
//
// Function:    EplNmtCnuGetNmtCommand()
//
// Description: returns the NMT-Command from the frame
//
//
//
// Parameters:      pFrameInfo_p = pointer to the Frame
//                                 with the NMT-Command
//
//
// Returns:         tEplNmtCommand = NMT-Command
//
//
// State:
//
//---------------------------------------------------------------------------
static tEplNmtCommand EplNmtCnuGetNmtCommand(tEplFrameInfo * pFrameInfo_p)
{
tEplNmtCommand          NmtCommand;
tEplNmtCommandService*  pNmtCommandService;

    pNmtCommandService = &pFrameInfo_p->m_pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService;

    NmtCommand = (tEplNmtCommand)AmiGetByteFromLe(&pNmtCommandService->m_le_bNmtCommandId);

    return NmtCommand;
}

//---------------------------------------------------------------------------
//
// Function:    EplNmtCnuNodeIdList()
//
// Description: check if the own nodeid is set in EPL Node List
//
//
//
// Parameters:      pbNmtCommandDate_p = pointer to the data of the NMT Command
//
//
// Returns:         BOOL = TRUE if nodeid is set in EPL Node List
//                         FALSE if nodeid not set in EPL Node List
//
//
// State:
//
//---------------------------------------------------------------------------
static BOOL EplNmtCnuNodeIdList(BYTE* pbNmtCommandDate_p)
{
BOOL            fNodeIdInList;
unsigned int    uiByteOffset;
BYTE            bBitOffset;
BYTE            bNodeListByte;

    // get byte-offset of the own nodeid in NodeIdList
    // devide though 8
    uiByteOffset = (unsigned int)(EplNmtCnuInstance_g.m_uiNodeId >> 3);
    // get bitoffset
    bBitOffset = (BYTE) EplNmtCnuInstance_g.m_uiNodeId % 8;

    bNodeListByte = AmiGetByteFromLe(&pbNmtCommandDate_p[uiByteOffset]);
    if((bNodeListByte & bBitOffset) == 0)
    {
        fNodeIdInList = FALSE;
    }
    else
    {
        fNodeIdInList = TRUE;
    }

return  fNodeIdInList;
}

#endif // #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_CN)) != 0)

// EOF