cbsref/csyrefplugins/csy27010/src/CsyMsgBufBpFrame.cpp
branchRCL_3
changeset 65 630d2f34d719
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
       
     1 //
       
     2 // * Copyright 2004 Neusoft America Inc.
       
     3 // * All rights reserved.
       
     4 // * This component and the accompanying materials are made available
       
     5 // * under the terms of the Eclipse Public License v1.0
       
     6 // * which accompanies this distribution, and is available
       
     7 // * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 // *
       
     9 // * Contributors:
       
    10 // * Keith Collins (Neusoft America Inc.)  original software development and additional code and modifications.
       
    11 // * Thomas Gahagen (Neusoft America Inc.)  additional code and modifications.
       
    12 // * Zhen Yuan (Neusoft America Inc.)  additional code and modifications.
       
    13 // *
       
    14 // * Description:  This file contains the implementation for the CCsyMsgBufBpFrame class.
       
    15 // *               This class is used to hold messages that the CSY sends to and receives
       
    16 // *               from the BP multiplexer.
       
    17 //
       
    18 
       
    19 /** @file
       
    20  * This file contains the implementation for the CCsyMsgBufBpFrame class.
       
    21  * This class is used to hold messages that the CSY sends to and receives
       
    22  * from the baseband multiplexer.
       
    23  */
       
    24 
       
    25 #include "CsyMsgBufBPFrame.h"
       
    26 #include "CsyGlobals.h"
       
    27 
       
    28 CCsyMsgBufBpFrame* CCsyMsgBufBpFrame::NewL()
       
    29 /**
       
    30  * This static method uses 2-phase construction to create an instance of
       
    31  * class CCsyMsgBufBpFrame.
       
    32  *
       
    33  * @return Pointer to the created object
       
    34  */
       
    35 	{
       
    36 	CCsyMsgBufBpFrame* p = new(ELeave) CCsyMsgBufBpFrame();
       
    37 	CleanupStack::PushL(p);
       
    38 	p->ConstructL();
       
    39 	CleanupStack::Pop(p);
       
    40 	return p;
       
    41  	}
       
    42 
       
    43 CCsyMsgBufBpFrame::~CCsyMsgBufBpFrame()
       
    44 /**
       
    45  * Destructor.
       
    46  */
       
    47 	{}
       
    48 
       
    49 CCsyMsgBufBpFrame::CCsyMsgBufBpFrame()
       
    50 /**
       
    51  * Constructor.
       
    52  */
       
    53 	{}
       
    54 
       
    55 void CCsyMsgBufBpFrame::ConstructL()
       
    56 /**
       
    57  * Set the buffer type to Frame and then zero the buffer's contents.
       
    58  */
       
    59 	{
       
    60 	iMsg.FillZ();
       
    61 	}
       
    62 
       
    63 TUint8 CCsyMsgBufBpFrame::GetDlcNum() const
       
    64 /**
       
    65  * The is method extracts the DLC number from the frame.
       
    66  *
       
    67  * @return DLC number
       
    68  */
       
    69 	{
       
    70 	return (TUint8) (iMsg[KAdvOptionAddress] >> 2); // remove EA and CR bits
       
    71 	}
       
    72 
       
    73 TUint8 CCsyMsgBufBpFrame::GetFrameType() const
       
    74 /**
       
    75  * The is method extracts the frame type from the frame.
       
    76  *
       
    77  * @return frame type
       
    78  */
       
    79 	{
       
    80 	return ((TUint8) (iMsg[KAdvOptionControl] & 0xEF));  // remove poll/final bit
       
    81 	}
       
    82 
       
    83 TUint8 CCsyMsgBufBpFrame::GetType4FrameSequence() const
       
    84 /**
       
    85  * The is method extracts the Convergence Layer Type 4 sequence from the frame.
       
    86  *
       
    87  * @return Frame Sequence
       
    88  */
       
    89 	{
       
    90 	return (TUint8) (iMsg[KAdvOptionType4FrameControl] >> 6);
       
    91 	}
       
    92