1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
29 // Read data from PDU
\r
30 void Com_ReadSignalDataFromPdu(
\r
31 const Com_SignalIdType signalId,
\r
34 void Com_ReadGroupSignalDataFromPdu(
\r
35 const Com_SignalIdType parentSignalId,
\r
36 const Com_SignalIdType groupSignalId,
\r
39 void Com_ReadSignalDataFromPduBuffer(
\r
40 const uint16 signalId,
\r
41 const boolean isGroupSignal,
\r
43 const void *pduBuffer,
\r
46 // write data to PDU
\r
47 void Com_WriteSignalDataToPdu(
\r
48 const Com_SignalIdType signalId,
\r
49 const void *signalData);
\r
51 void Com_WriteGroupSignalDataToPdu(
\r
52 const Com_SignalIdType parentSignalId,
\r
53 const Com_SignalIdType groupSignalId,
\r
54 const void *signalData);
\r
56 void Com_WriteSignalDataToPduBuffer(
\r
57 const uint16 signalId,
\r
58 const boolean isGroupSignal,
\r
59 const void *signalData,
\r
61 const uint8 pduSize);
\r
64 * This function copies numBits bits of data from Source to Destination with the possibility to offset
\r
65 * both the source and destination.
\r
67 * Return value: the last bit it copies (sign bit).
\r
69 //uint8 Com_CopyData(void *Destination, const void *Source, uint8 numBits, uint8 destOffset, uint8 sourceOffset);
\r
71 //void Com_CopyData2(char *dest, const char *source, uint8 destByteLength, uint8 segmentStartBitOffset, uint8 segmentBitLength);
\r
73 void Com_ReadDataSegment(uint8 *dest, const uint8 *source, uint8 destByteLength,
\r
74 Com_BitPositionType segmentStartBitOffset, uint8 segmentBitLength, boolean signedOutput);
\r
76 void Com_WriteDataSegment(uint8 *pdu, uint8 *pduSignalMask, const uint8 *signalDataPtr, uint8 destByteLength,
\r
77 Com_BitPositionType segmentStartBitOffset, uint8 segmentBitLength);
\r
79 Com_BitPositionType motorolaBitNrToPduOffset (Com_BitPositionType motorolaBitNr);
\r
80 Com_BitPositionType intelBitNrToPduOffset (Com_BitPositionType intelBitNr, Com_BitPositionType segmentBitLength, Com_BitPositionType pduBitLength);
\r
81 void Com_RxProcessSignals(const ComIPdu_type *IPdu,Com_Arc_IPdu_type *Arc_IPdu);
\r
82 PduIdType getPduId(const ComIPdu_type* IPdu);
\r
84 boolean isPduBufferLocked(PduIdType pduId);
\r
86 #endif /* COM_MISC_H_ */
\r