Bus Mirroring (Mirror)
AUTOSAR Classic Communication Services-Modul Bus Mirroring (Mirror, Spezifikation: AUTOSAR_CP_SWS_BusMirroring.pdf, AUTOSAR_SWS_BusMirroring.pdf).
Funktionen — Übersicht
void Mirror_Init (const Mirror_ConfigType* configPtr);This function initializes the Bus Mirroring module.void Mirror_DeInit (void);This function resets the Bus Mirroring module to the uninitialized state.void Mirror_GetVersionInfo (Std_VersionInfoType* versionInfo);Returns the version information of this module.Std_ReturnType Mirror_GetStaticFilterState (NetworkHandleType network, uint8 filterId, boolean* isActive);Returns the state of a pre-configured filter.Std_ReturnType Mirror_SetStaticFilterState (NetworkHandleType network, uint8 filterId, boolean isActive);Sets the state of a pre-configured filter.Std_ReturnType Mirror_AddCanRangeFilter (NetworkHandleType network, uint8* filterId, Can_IdType lowerId, Can_IdType upperId);Creates a CAN ID range filter.Std_ReturnType Mirror_AddCanMaskFilter (NetworkHandleType network, uint8* filterId, Can_IdType id, Can_IdType mask);Creates a CAN ID mask filter.Std_ReturnType Mirror_AddLinRangeFilter (NetworkHandleType network, uint8* filterId, uint8 lowerId, uint8 upperId);Creates a LIN frame ID range filter.Std_ReturnType Mirror_AddLinMaskFilter (NetworkHandleType network, uint8* filterId, uint8 id, uint8 mask);Creates a LIN frame ID mask filter.Std_ReturnType Mirror_AddFlexRayFilter (NetworkHandleType network, uint8* filterId, uint16 lowerSlotId, uint16 upperSlotId, uint8 lowerBaseCycle, uint8 upperBaseCycle, uint8 cycleRepetition, Fr_ChannelType frChannel);Creates a FlexRay filter.Std_ReturnType Mirror_RemoveFilter (NetworkHandleType network, uint8 filterId);Removes a CAN, LIN, or FlexRay filter that was added at runtime.boolean Mirror_IsMirrorActive (void);Returns the global mirroring state.void Mirror_Offline (void);Completely disables any mirroring activities.NetworkHandleType Mirror_GetDestNetwork (void);Returns the currently selected destination bus.Std_ReturnType Mirror_SwitchDestNetwork (NetworkHandleType network);Changes the destination bus to the given ComM channel.boolean Mirror_IsSourceNetworkStarted (NetworkHandleType network);Returns the state of a source bus.Std_ReturnType Mirror_StartSourceNetwork (NetworkHandleType network);Activates a source bus.Std_ReturnType Mirror_StopSourceNetwork (NetworkHandleType network);Deactivates a source bus.Mirror_NetworkType Mirror_GetNetworkType (NetworkHandleType network);Returns the network type of the given network.uint8 Mirror_GetNetworkId (NetworkHandleType network);Returns the network ID of the given network.NetworkHandleType Mirror_GetNetworkHandle (Mirror_NetworkType networkType, uint8 networkId);Returns the network handle (ComMChannel) of the bus identified by the given network type and network ID, or...void Mirror_ReportCanFrame (uint8 controllerId, Can_IdType canId, uint8 length, const uint8* payload);Reports a received or transmitted CAN frame.void Mirror_ReportFlexRayChannelStatus (uint8 clusterId, uint16 channelAStatus, uint16 channelBStatus);Reports the aggregated channel status for FlexRay channels A and B of a cluster.void Mirror_ReportFlexRayFrame (uint8 controllerId, uint16 slotId, uint8 cycle, Fr_ChannelType frChannel, const PduInfoType* frame, boolean txConflict);Reports a received or transmitted FlexRay frame or a Tx conflict.void Mirror_ReportLinFrame (NetworkHandleType network, Lin_FramePidType pid, const PduInfoType* pdu, Lin_StatusType status);Reports a received or transmitted LIN frame.void Mirror_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.Std_ReturnType Mirror_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size...void Mirror_MainFunction (void);Main function of the Bus Mirroring module.
Typen — Übersicht
enum Mirror_NetworkTypeThis type represents the bus types that are supported as source or destination buses for the Bus Mirroring module.enum Mirror_FlexRayChannelTypeThis type represents the assignment of a FlexRay frame to the channels A and B of a FlexRay network.struct Mirror_ConfigTypeThis is the base type for the configuration of the Bus Mirroring module.struct Mirror_CanIdTypeLocal representation for Can_IdType Variation –
Anforderungen — Übersicht
SWS_Mirror_00001The generation tool shall ensure that no ComMChannel is ref- erenced both from a MirrorSourceNetwork and a MirrorDestNetwork.SWS_Mirror_00002A call to Mirror_Init initializes all internal variables and sets the Bus Mirroring module to the initialized state.SWS_Mirror_00003A call to Mirror_DeInit sets the Bus Mirroring module back to the uninitialized state.SWS_Mirror_00004If development error reporting is enabled via MirrorDev- ErrorDetect , the Bus Mirroring module shall call Det_ReportError...SWS_Mirror_00005When Mirror_Init is called in initialized state, the Bus Mirroring module shall not re-initialize its internal variables.SWS_Mirror_00006The Bus Mirroring module shall use the Mirror_MainFunc- tion for timing related purposes.SWS_Mirror_00007Type of error Related error code Error value An API was called while the module was uninitialized MIRROR_E_UNINIT 0x01 The...SWS_Mirror_00008Type of error Related error code Error value A message could not be stored in the queue MIRROR_E_QUEUE_OVERRUN 0x40 A message...SWS_Mirror_00009Upon initialization, the destination bus ( MirrorDestNet- work ) referenced by MirrorInitialDestNetworkRef is selected.SWS_Mirror_00011When the destination bus is changed using Mirror_- SwitchDestNetwork , all source buses shall be disabled, all statically...SWS_Mirror_00012When Mirror_Offline is called, all sources buses shall be deactivated, the destination bus shall be reset to the...SWS_Mirror_00013Upon initialization, the Bus Mirroring module shall be inactive.SWS_Mirror_00014When a source bus is enabled using Mirror_Start- SourceNetwork , frame and status acquisition from that bus shall be started,...SWS_Mirror_00015When a source bus is disabled using Mirror_Stop- SourceNetwork , frame and status acquisition from that bus shall be stopped.SWS_Mirror_00016Upon initialization, all statically configured filters of the Bus Mir- roring module are disabled, and no dynamic filters are...SWS_Mirror_00017While a filter is active (statically configured and activated by Mirror_SetStaticFilterState or dynamically added using one of...SWS_Mirror_00018When a statically configured filter is deactivated by Mirror_- SetStaticFilterState or a dynamically added filter is removed...SWS_Mirror_00019When Mirror_StartSourceNetwork is called to start a CAN source bus, the Bus Mirroring module shall call...SWS_Mirror_00020When Mirror_StopSourceNetwork is called to stop a CAN source bus, the Bus Mirroring module shall call CanIf_EnableBusMirroring...SWS_Mirror_00021When Mirror_ReportCanFrame is called to report a re- ceived or transmitted CAN frame, the Bus Mirroring module shall match the...SWS_Mirror_00022A CAN mask filter statically configured as MirrorSource- CanFilterMask matches the reported canId , if this canId masked by...SWS_Mirror_00023A CAN mask filter dynamically added by a call to Mirror_- AddCanMaskFilter matches the reported canId , if this canId masked...SWS_Mirror_00024A CAN range filter statically configured as MirrorSource- CanFilterRange matches the reported canId , if the value of this...SWS_Mirror_00025A CAN range filter dynamically added by a call to Mirror_Ad- dCanRangeFilter matches the reported canId , if the value of this...SWS_Mirror_00026The Bus Mirroring module shall poll the status of each active CAN source bus by cyclically calling CanIf_GetControllerMode and...SWS_Mirror_00027When Mirror_StartSourceNetwork is called to start a LIN source bus, the Bus Mirroring module shall call...SWS_Mirror_00028When Mirror_StopSourceNetwork is called to stop a LIN source bus, the Bus Mirroring module shall call LinIf_EnableBusMirroring...SWS_Mirror_00029When Mirror_ReportLinFrame is called to report a re- ceived or transmitted LIN frame, the Bus Mirroring module shall extract...SWS_Mirror_00030A LIN mask filter statically configured as MirrorSourceLin- FilterMask matches the reported frame ID, if this ID masked by the...SWS_Mirror_00031A LIN mask filter dynamically added by a call to Mirror_- AddLinMaskFilter matches the reported frame ID, if this ID masked by...SWS_Mirror_00032A LIN range filter statically configured as MirrorSourceLin- FilterRange matches the reported frame ID, if the value of this...SWS_Mirror_00033A LIN range filter dynamically added by a call to Mirror_- AddLinRangeFilter matches the reported frame ID, if the value of...SWS_Mirror_00034The Bus Mirroring module shall evaluate the status reported by Mirror_ReportLinFrame.SWS_Mirror_00035The Bus Mirroring module shall poll the status of each active LIN source bus by cyclically calling LinIf_GetTrcvMode from the...SWS_Mirror_00036When Mirror_StartSourceNetwork is called to start a FlexRay source bus, the Bus Mirroring module shall call...SWS_Mirror_00037When Mirror_StopSourceNetwork is called to stop a FlexRay source bus, the Bus Mirroring module shall call...SWS_Mirror_00038When Mirror_ReportFlexRayFrame is called to report a received or transmitted FlexRay frame ( txConflict is reported as FALSE),...SWS_Mirror_00039A FlexRay filter statically configured as MirrorSource- FlexRayFilter matches the reported slotId and cycle if the slotId is...SWS_Mirror_00040A FlexRay filter dynamically added by a call to Mirror_- AddFlexRayFilter matches the reported slotId and cycle if the slotId...SWS_Mirror_00041When Mirror_ReportFlexRayFrame is called to report a transmission conflict ( txConflict is reported as TRUE), the Bus...SWS_Mirror_00042The Bus Mirroring module shall poll the status of each active FlexRay source bus by cyclically calling FrIf_GetState from the...SWS_Mirror_00043When the Bus Mirroring module is initialized or when Mir- ror_SwitchDestNetwork is called to activate a FlexRay (...SWS_Mirror_00044When the first data item is added to an empty destina- tion frame buffer (as described in [SWS_Mirror_00045],...SWS_Mirror_00045When a source frame has been received as described in [SWS_Mirror_00021], [SWS_Mirror_00029], or [SWS_Mirror_00038], the Bus...SWS_Mirror_00046When a new FlexRay transmission conflict was reported as described in [SWS_Mirror_00041], the Bus Mirroring module shall...SWS_Mirror_00047When the reported source bus state has changed and if no source frame is received from the same source bus within one main...SWS_Mirror_00048When a data item does not fit in the remaining space of the cur- rently active destination frame buffer, the Bus Mirroring...SWS_Mirror_00049When the relative time stamp of a data item exceeds 655 : 35 ms , the Bus Mirroring module shall place the currently active...SWS_Mirror_00050If the optional configuration parameter MirrorDestTrans- missionDeadline is configured and the transmission timeout expires,...SWS_Mirror_00051To initiate the transmission of a queued serialized desti- nation frame, the Bus Mirroring module shall call...SWS_Mirror_00052In case the active destination channel is MirrorDestNet- workCanXL , MirrorDestNetworkIp or MirrorDestNetworkCdd , the Bus...SWS_Mirror_00053The Bus Mirroring module shall initiate the transmission of queued serialized destination frames from the Mirror_MainFunction...SWS_Mirror_00054When Mirror_TriggerTransmit is called for a serialized destination frame, the Mirror module shall copy the used part of the...SWS_Mirror_00055The header of a Bus Mirroring destination frame shall contain the following fields in this order: 1.SWS_Mirror_00056The ProtocolVersion shall indicate the layout of the header and the data items.SWS_Mirror_00057The width of the ProtocolVersion field shall be 8 bits.SWS_Mirror_00058The SequenceNumber shall increase with each transmission of a destination frame.SWS_Mirror_00059The width of the SequenceNumber field shall be 8 bits.SWS_Mirror_00060The HeaderTimestamp shall reflect the time when collection of data items into the destination frame started.SWS_Mirror_00061The width of the HeaderTimestamp field shall be 10 bytes, the layout is shown in Table 7.SWS_Mirror_00062The DataLength shall give the number of bytes following the header.SWS_Mirror_00063The width of the DataLength field shall be 16 bits.SWS_Mirror_00064Data items of a Bus Mirroring destination frame shall contain the following fields in this order: 1.SWS_Mirror_00065The Timestamp shall reflect the temporal offset of the source frame reception from the HeaderTimestamp , i.SWS_Mirror_00066The width of the Timestamp field shall be 16 bits.SWS_Mirror_00067The NetworkStateAvailable shall indicate whether the field NetworkState is present in the data item.SWS_Mirror_00068The width of the NetworkStateAvailable field shall be 1 bit.SWS_Mirror_00069The FrameIDAvailable shall indicate whether the field FrameID is present in the data item.SWS_Mirror_00070The width of the FrameIDAvailable field shall be 1 bit.SWS_Mirror_00071The PayloadAvailable shall indicate whether the fields PayloadLength and Payload are present in the data item.SWS_Mirror_00072The width of the PayloadAvailable field shall be 1 bit.SWS_Mirror_00073The NetworkType shall indicate the type of the source bus.SWS_Mirror_00074The width of the NetworkType field shall be 5 bits, the possi- ble values are shown in Table 7.SWS_Mirror_00075The NetworkID shall identify a bus of a certain NetworkType uniquely, i.SWS_Mirror_00076The width of the NetworkID field shall be 8 bits.SWS_Mirror_00077The NetworkState shall provide information about the source bus state.SWS_Mirror_00078The width of the NetworkState field shall be 8 bits, the lay- out is bus specific and is defined separately for each bus as...SWS_Mirror_00079Bit 7 (the most significant bit) of the NetworkState shall al- ways contain the Frames Lost state.SWS_Mirror_00080Bit 6 of the NetworkState shall always contain the Bus Online state.SWS_Mirror_00081Bit 5 of the NetworkStateCAN shall contain the Error-Passive state.SWS_Mirror_00082Bit 4 of the NetworkStateCAN shall contain the Bus-Off state.SWS_Mirror_00083Bits 3 – 0 of the NetworkStateCAN shall contain the Tx error counter of the can controller divided by 8.SWS_Mirror_00084Bits 5 and 4 of the NetworkStateLIN are currently reserved.SWS_Mirror_00085Bit 3 of the NetworkStateLIN shall contain the Header Tx Error state.SWS_Mirror_00086Bit 2 of the NetworkStateLIN shall contain the Tx Error state.SWS_Mirror_00087Bit 1 of the NetworkStateLIN shall contain the Rx Error state.SWS_Mirror_00088Bit 0 of the NetworkStateLIN shall contain the Header Rx No Response state.SWS_Mirror_00089Bit 5 of the NetworkStateFlexRay shall contain the Bus Synchronous state.SWS_Mirror_00090Bit 4 of the NetworkStateFlexRay shall contain the Normal Active state.SWS_Mirror_00091Bit 3 of the NetworkStateFlexRay shall contain the Syntax Error state.SWS_Mirror_00092Bit 2 of the NetworkStateFlexRay shall contain the Content Error state.SWS_Mirror_00093Bit 1 of the NetworkStateFlexRay shall contain the Bound- ary Violation state.SWS_Mirror_00094Bit 0 of the NetworkStateFlexRay shall contain the Tx Con- flict state.SWS_Mirror_00095The FrameID shall provide the identification of the source frame.SWS_Mirror_00096The width and layout of the FrameID field is bus specific and is defined separately for each bus as FrameIDCAN , FrameIDLIN ,...SWS_Mirror_00097The width of the FrameIDCAN field shall be 4 bytes.SWS_Mirror_00098Bit 7 of Byte 0 of the FrameIDCAN shall be set to 1 for an Extended CAN ID and to 0 for a Standard CAN ID.SWS_Mirror_00099Bit 6 of Byte 0 of the FrameIDCAN shall be set to 1 for a CAN- FD frame and to 0 for a CAN 2.SWS_Mirror_00100Bit 5 of Byte 0 of the FrameIDCAN is currently reserved.SWS_Mirror_00101Bits 4 – 0 of Byte 0 and Bytes 1 – 3 of the FrameIDCAN shall contain the CAN ID of the reported CAN frame in network byte...SWS_Mirror_00102The width of the FrameIDLIN field shall be 1 byte.SWS_Mirror_00103Byte 0 of the FrameIDLIN shall contain the LIN PID of the reported LIN frame.SWS_Mirror_00104The width of the FrameIDFlexRay field shall be 3 bytes.SWS_Mirror_00105Bits 7 – 6 of Byte 0 of the FrameIDFlexRay shall contain the channel assignment of the reported FlexRay frame.SWS_Mirror_00106Bits 5 – 4 of Byte 0 of the FrameIDFlexRay are currently reserved.SWS_Mirror_00107Bits 2 – 0 of Byte 0 and Byte 1 of the FrameIDFlexRay shall contain the slot ID of the reported FlexRay frame in network byte...SWS_Mirror_00108Byte 2 of the FrameIDFlexRay shall contain the cycle in which the reported FlexRay frame was sent or received.SWS_Mirror_00109The PayloadLength shall provide the length of the payload of the source frame.SWS_Mirror_00110The width of the PayloadLength field shall be 8 bits.SWS_Mirror_00111The Payload shall provide the actual payload of the source frame.SWS_Mirror_00112The width of the Payload field shall correspond to the reported source frame.SWS_Mirror_00113If a destination frame cannot be placed in the queue because the queue is already full, the Bus Mirroring module shall drop...SWS_Mirror_00114If the canId of a CAN source frame matches the Mirror- SourceCanSingleIdMappingSourceCanId of a MirrorSourceCanSingleI-...SWS_Mirror_00115If the canId of a CAN source frame masked by the Mirror- SourceCanMaskBasedIdMappingSourceCanIdMask of a MirrorSourceCan-...SWS_Mirror_00116If the canId of a CAN source frame matches neither a Mir- rorSourceCanSingleIdMapping nor a MirrorSourceCanMaskBasedIdMap-...SWS_Mirror_00117If the frame ID extracted from the pid of a LIN source frame matches the MirrorSourceLinToCanIdMappingLinId of a...SWS_Mirror_00118If the frame ID extracted from the pid of a LIN source frame matches no MirrorSourceLinToCanIdMapping , the CAN destination...SWS_Mirror_00119The Bus Mirroring module shall place all CAN destination frames in the queue.SWS_Mirror_00120If a destination frame cannot be placed in the queue because the queue is already full, the Bus Mirroring module shall drop...SWS_Mirror_00121To initiate the transmission of a queued CAN destination frame, the Bus Mirroring module shall call PduR_MirrorTransmit with...SWS_Mirror_00122When Mirror_TriggerTransmit is called for a CAN desti- nation frame, the Mirror module shall copy the payload of the source...SWS_Mirror_00123If MirrorStatusCanId is configured and when one or more source bus states have changed, the Bus Mirroring module shall...SWS_Mirror_00124If MirrorStatusCanId is configured, the Bus Mirroring mod- ule shall create a new status item for each source bus where the...SWS_Mirror_00125When a status item does not fit in the remaining space of the currently active status frame buffer, the Bus Mirroring module...SWS_Mirror_00126When status items have been written for all source buses where the reported state has changed, the Bus Mirroring module shall...SWS_Mirror_00127The header of a Bus Mirroring status frame shall contain the SHProtocolVersion.SWS_Mirror_00128The SHProtocolVersion shall be identical to the Proto- colVersion of a serialized destination frame.SWS_Mirror_00129Status items of a Bus Mirroring status frame shall contain the following fields in this order: 1.SWS_Mirror_00131The layout and semantics of the SIFrameIDAvailable shall be identical to the FrameIDAvailable used in a serialized data item.SWS_Mirror_00132Bit 5 of Byte 0 of the status item is currently reserved and shall always be set to 0.SWS_Mirror_00133The layout and semantics of the SINetworkType shall be identical to the NetworkType used in a serialized data item.SWS_Mirror_00134The layout and semantics of the SINetworkID shall be iden- tical to the NetworkID used in a serialized data item.SWS_Mirror_00135The layout and semantics of the SINetworkState shall be identical to the NetworkState used in a serialized data item.SWS_Mirror_00136The layout and semantics of the SIFrameID shall be identical to the FrameID used in a serialized data item.SWS_Mirror_00137If development error detection is enabled by MirrorDevEr- rorDetect , the Bus Mirroring module shall check the TxPduId of the...SWS_Mirror_00138If development error detection is enabled by MirrorDevEr- rorDetect , the Bus Mirroring module shall check the...SWS_Mirror_00142The Bus Mirroring module shall include the header file CanIf.SWS_Mirror_00143The Bus Mirroring module shall include the header file LinIf.SWS_Mirror_00144The Bus Mirroring module shall include the header file FrIf.SWS_Mirror_00146When Mirror_ReportFlexRayChannelStatus is called to report the FlexRay channel state, the Bus Mirroring module shall compare...SWS_Mirror_00147The Bus Mirroring module shall include the header file StbM.SWS_Mirror_00149The layout and semantics of the SINetworkStateAvail- able shall be identical to the NetworkStateAvailable used in a serialized...SWS_Mirror_00150If the PduR_MirrorTransmit returns E_NOT_OK , the Bus Mirroring module shall immediately remove the destination frame from the...SWS_Mirror_00151If the PduInfoPtr->SduLength provided by Mirror_- TriggerTransmit is too small for the currently transmitted serialized...SWS_Mirror_00152When Mirror_TxConfirmation is called to report the suc- cessful or failed transmission of a serialized destination frame, the...SWS_Mirror_00153If the Mirror_TxConfirmation reports the failed transmis- sion of a serialized destination frame ( result is E_NOT_OK ), the...SWS_Mirror_00154If the PduR_MirrorTransmit returns E_NOT_OK , the Bus Mirroring module shall immediately remove the destination frame from the...SWS_Mirror_00155The Bus Mirroring module shall initiate the transmission of queued CAN destination frames from the Mirror_MainFunction and...SWS_Mirror_00156The Bus Mirroring module shall not transmit the next CAN des- tination frame before the previous destination frame has been...SWS_Mirror_00157When Mirror_TxConfirmation is called to report the suc- cessful or failed transmission of a CAN destination frame, the Bus...SWS_Mirror_00158If the Mirror_TxConfirmation reports the failed transmis- sion of a CAN destination frame ( result is E_NOT_OK ), the Bus...SWS_Mirror_00159Bit 3 of Byte 0 of the FrameIDFlexRay shall contain a flag indicating whether the reported slot ID and cycle are valid (flag...SWS_Mirror_00160If a set of MirrorDestPdu s is configured for a MirrorDest- NetworkFlexRay , the Bus Mirroring module shall use the PDUs of...SWS_Mirror_00161In case the active destination channel is MirrorDestNet- workFlexRay , the Bus Mirroring module shall not transmit the next...SWS_Mirror_00165This type represents a special value of NetworkHandleType, representing an invalid network handle.SWS_Mirror_00166The Bus Mirroring module shall call interfaces of the CAN, LIN, and FlexRay Interface modules only from within the same...SWS_Mirror_00167The Bus Mirroring module shall apply appropriate mechanisms to allow calls of Mirror_ReportCanFrame from the partition to...SWS_Mirror_00168The Bus Mirroring module shall apply appropriate mechanisms to allow calls of Mirror_ReportLinFrame from the partition to...SWS_Mirror_00169The Bus Mirroring module shall apply appropriate mechanisms to allow calls of Mirror_ReportFlexRayFrame from the partition to...SWS_Mirror_01031Provided port for the interface MirrorControl.SWS_Mirror_01033Name MirrorControl Comment Provides access to the control functions of the Bus Mirroring module.SWS_Mirror_01100Module Header File Imported Type Can_GeneralTypes.SWS_Mirror_01101PduR_MirrorTransmit PduR_Mirror.SWS_Mirror_01102CanIf_EnableBusMirroring CanIf.SWS_Mirror_CONSTR_00001The MirrorDestPdu of a MirrorDestNetwork- Can requires a MetaDataItem of MetaDataItemType CAN_ID_32.SWS_Mirror_CONSTR_00002The CanFdPaddingValue that is used to transmit the PDU referenced by MirrorDestPduRef for a CAN-FD destination bus shall be...SWS_Mirror_CONSTR_00003The configured MirrorSourceFlexRayFilter s shall be configured such that they do not include serialized frames transmitted on...SWS_Mirror_CONSTR_00004FrIfAllowDynamicLSduLength shall be set to true for all FrIfFrameStructure s that contain FrIfTxPdu s referenced by a Mir-...SWS_Mirror_NA{DRAFT} These requirements are not applicable to this specifica- tion.
Funktionen & Typen — Detailansicht
function Mirror_Init [SWS_Mirror_01003] 📄 PDF
void Mirror_Init(const Mirror_ConfigType* configPtr);
This function initializes the Bus Mirroring module. In configurations, in which Mirror is assigned to more than one partition (i.e. Mirror_Main Functions are mapped to partitions), Mirror may provide one init function per partition.
function Mirror_DeInit [SWS_Mirror_01004] 📄 PDF
void Mirror_DeInit(void);
This function resets the Bus Mirroring module to the uninitialized state.
function Mirror_GetVersionInfo [SWS_Mirror_01005] 📄 PDF
void Mirror_GetVersionInfo(Std_VersionInfoType* versionInfo);
Returns the version information of this module.
function Mirror_GetStaticFilterState [SWS_Mirror_01006] 📄 PDF
Std_ReturnType Mirror_GetStaticFilterState(NetworkHandleType network, uint8 filterId, boolean* isActive);
Returns the state of a pre-configured filter.
function Mirror_SetStaticFilterState [SWS_Mirror_01007] 📄 PDF
Std_ReturnType Mirror_SetStaticFilterState(NetworkHandleType network, uint8 filterId, boolean isActive);
Sets the state of a pre-configured filter.
function Mirror_AddCanRangeFilter [SWS_Mirror_01008] 📄 PDF
Std_ReturnType Mirror_AddCanRangeFilter(NetworkHandleType network, uint8* filterId, Can_IdType lowerId, Can_IdType upperId);
Creates a CAN ID range filter.
function Mirror_AddCanMaskFilter [SWS_Mirror_01009] 📄 PDF
Std_ReturnType Mirror_AddCanMaskFilter(NetworkHandleType network, uint8* filterId, Can_IdType id, Can_IdType mask);
Creates a CAN ID mask filter.
function Mirror_AddLinRangeFilter [SWS_Mirror_01010] 📄 PDF
Std_ReturnType Mirror_AddLinRangeFilter(NetworkHandleType network, uint8* filterId, uint8 lowerId, uint8 upperId);
Creates a LIN frame ID range filter.
function Mirror_AddLinMaskFilter [SWS_Mirror_01011] 📄 PDF
Std_ReturnType Mirror_AddLinMaskFilter(NetworkHandleType network, uint8* filterId, uint8 id, uint8 mask);
Creates a LIN frame ID mask filter.
function Mirror_AddFlexRayFilter [SWS_Mirror_01012] 📄 PDF
Std_ReturnType Mirror_AddFlexRayFilter(NetworkHandleType network, uint8* filterId, uint16 lowerSlotId, uint16 upperSlotId, uint8 lowerBaseCycle, uint8 upperBaseCycle, uint8 cycleRepetition, Fr_ChannelType frChannel);
Creates a FlexRay filter.
function Mirror_RemoveFilter [SWS_Mirror_01013] 📄 PDF
Std_ReturnType Mirror_RemoveFilter(NetworkHandleType network, uint8 filterId);
Removes a CAN, LIN, or FlexRay filter that was added at runtime.
function Mirror_IsMirrorActive [SWS_Mirror_01014] 📄 PDF
boolean Mirror_IsMirrorActive(void);
Returns the global mirroring state.
function Mirror_Offline [SWS_Mirror_01015] 📄 PDF
void Mirror_Offline(void);
Completely disables any mirroring activities. Source buses are reset to disabled, queued messages are purged, and the destination bus is reset to the default destination. Pre-configured filters are disabled, and filters added at runtime are removed.
function Mirror_GetDestNetwork [SWS_Mirror_01016] 📄 PDF
NetworkHandleType Mirror_GetDestNetwork(void);
Returns the currently selected destination bus.
function Mirror_SwitchDestNetwork [SWS_Mirror_01017] 📄 PDF
Std_ReturnType Mirror_SwitchDestNetwork(NetworkHandleType network);
Changes the destination bus to the given ComM channel. The previously active destination bus and all source buses are disabled.
function Mirror_IsSourceNetworkStarted [SWS_Mirror_01018] 📄 PDF
boolean Mirror_IsSourceNetworkStarted(NetworkHandleType network);
Returns the state of a source bus.
function Mirror_StartSourceNetwork [SWS_Mirror_01019] 📄 PDF
Std_ReturnType Mirror_StartSourceNetwork(NetworkHandleType network);
Activates a source bus.
function Mirror_StopSourceNetwork [SWS_Mirror_01020] 📄 PDF
Std_ReturnType Mirror_StopSourceNetwork(NetworkHandleType network);
Deactivates a source bus.
function Mirror_GetNetworkType [SWS_Mirror_01021] 📄 PDF
Mirror_NetworkType Mirror_GetNetworkType(NetworkHandleType network);
Returns the network type of the given network.
function Mirror_GetNetworkId [SWS_Mirror_01022] 📄 PDF
uint8 Mirror_GetNetworkId(NetworkHandleType network);
Returns the network ID of the given network.
function Mirror_GetNetworkHandle [SWS_Mirror_01023] 📄 PDF
NetworkHandleType Mirror_GetNetworkHandle(Mirror_NetworkType networkType, uint8 networkId);
Returns the network handle (ComMChannel) of the bus identified by the given network type and network ID, or MIRROR_INVALID_NETWORK.
function Mirror_ReportCanFrame [SWS_Mirror_01024] 📄 PDF
void Mirror_ReportCanFrame(uint8 controllerId, Can_IdType canId, uint8 length, const uint8* payload);
Reports a received or transmitted CAN frame. All received CAN frames that pass the hardware acceptance filter are reported, independent of the software filter configuration. Transmitted CAN frames are reported when the transmission is confirmed.
function Mirror_ReportFlexRayChannelStatus [SWS_Mirror_01025] 📄 PDF
void Mirror_ReportFlexRayChannelStatus(uint8 clusterId, uint16 channelAStatus, uint16 channelBStatus);
Reports the aggregated channel status for FlexRay channels A and B of a cluster. The status is encoded as specified in SWS_Fr_00558.
function Mirror_ReportFlexRayFrame [SWS_Mirror_01026] 📄 PDF
void Mirror_ReportFlexRayFrame(uint8 controllerId, uint16 slotId, uint8 cycle, Fr_ChannelType frChannel, const PduInfoType* frame, boolean txConflict);
Reports a received or transmitted FlexRay frame or a Tx conflict.
function Mirror_ReportLinFrame [SWS_Mirror_01027] 📄 PDF
void Mirror_ReportLinFrame(NetworkHandleType network, Lin_FramePidType pid, const PduInfoType* pdu, Lin_StatusType status);
Reports a received or transmitted LIN frame.
function Mirror_TxConfirmation [SWS_Mirror_01028] 📄 PDF
void Mirror_TxConfirmation(PduIdType TxPduId, Std_ReturnType result);
The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
function Mirror_TriggerTransmit [SWS_Mirror_01029] 📄 PDF
Std_ReturnType Mirror_TriggerTransmit(PduIdType TxPduId, PduInfoType* PduInfoPtr);
Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it shall copy its data into the buffer provided by PduInfoPtr->SduDataPtr and update the length of the actual copied data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK without changing PduInfoPtr.
function Mirror_MainFunction [SWS_Mirror_01030] 📄 PDF
void Mirror_MainFunction(void);
Main function of the Bus Mirroring module. Used for scheduling purposes and timeout supervision. Per configured MirrorMainFunction instance one Mirror_MainFunction_<shortName> shall be implemented. Hereby <shortName> is the short name of the MirrorMainFunction configuration container in the ECU configuration.
type Mirror_NetworkType [SWS_Mirror_01000] 📄 PDF
This type represents the bus types that are supported as source or destination buses for the Bus Mirroring module. The invalid type is used as a return value if a function cannot return a valid type. Variation –
type Mirror_FlexRayChannelType [SWS_Mirror_01001] 📄 PDF
This type represents the assignment of a FlexRay frame to the channels A and B of a FlexRay network. Variation –
type Mirror_ConfigType [SWS_Mirror_01002] 📄 PDF
This is the base type for the configuration of the Bus Mirroring module. A pointer to an instance of this structure will be used in the initialization of the Bus Mirroring module. The content of this structure is defined in chapter 10 Configuration specification.
type Mirror_CanIdType [SWS_Mirror_01032] 📄 PDF
Local representation for Can_IdType Variation –
requirement SWS_Mirror_00001 [SWS_Mirror_00001] 📄 PDF
The generation tool shall ensure that no ComMChannel is ref- erenced both from a MirrorSourceNetwork and a MirrorDestNetwork .
requirement SWS_Mirror_00002 [SWS_Mirror_00002] 📄 PDF
A call to Mirror_Init initializes all internal variables and sets the Bus Mirroring module to the initialized state.
requirement SWS_Mirror_00003 [SWS_Mirror_00003] 📄 PDF
A call to Mirror_DeInit sets the Bus Mirroring module back to the uninitialized state.
requirement SWS_Mirror_00004 [SWS_Mirror_00004] 📄 PDF
If development error reporting is enabled via MirrorDev- ErrorDetect , the Bus Mirroring module shall call Det_ReportError with the er- ror code MIRROR_E_UNINIT when any API other than Mirror_Init or Mirror_- GetVersionInfo is called in uninitialized state.
requirement SWS_Mirror_00005 [SWS_Mirror_00005] 📄 PDF
When Mirror_Init is called in initialized state, the Bus Mirroring module shall not re-initialize its internal variables. It shall instead call Det_ReportError with the error code MIRROR_E_REINIT if development error reporting is enabled (see MirrorDevErrorDetect ).
requirement SWS_Mirror_00006 [SWS_Mirror_00006] 📄 PDF
The Bus Mirroring module shall use the Mirror_MainFunc- tion for timing related purposes.
requirement SWS_Mirror_00007 [SWS_Mirror_00007] 📄 PDF
Type of error Related error code Error value An API was called while the module was uninitialized MIRROR_E_UNINIT 0x01 The init API was called twice MIRROR_E_REINIT 0x02 Type of error Related error code Error value Mirror_Init was called with an invalid configuration pointer MIRROR_E_INIT_FAILED 0x03 An API service was called with a NULL pointer MIRROR_E_PARAM_POINTER 0x10 An API service was called with a wrong ID MIRROR_E_INVALID_PDU_SDU_ID 0x11 An API service was called with wrong network handle MIRROR_E_INVALID_NETWORK_ID 0x12
requirement SWS_Mirror_00008 [SWS_Mirror_00008] 📄 PDF
Type of error Related error code Error value A message could not be stored in the queue MIRROR_E_QUEUE_OVERRUN 0x40 A message could not be transmitted MIRROR_E_TRANSMIT_FAILED 0x41
requirement SWS_Mirror_00009 [SWS_Mirror_00009] 📄 PDF
Upon initialization, the destination bus ( MirrorDestNet- work ) referenced by MirrorInitialDestNetworkRef is selected.
requirement SWS_Mirror_00011 [SWS_Mirror_00011] 📄 PDF
When the destination bus is changed using Mirror_- SwitchDestNetwork , all source buses shall be disabled, all statically configured filters shall be disabled, and all other filters shall be removed. Mirrored frames that are still waiting for transmission shall be discarded.
requirement SWS_Mirror_00012 [SWS_Mirror_00012] 📄 PDF
When Mirror_Offline is called, all sources buses shall be deactivated, the destination bus shall be reset to the MirrorInitialDestNet- workRef , all statically configured filters shall be disabled, and all other filters shall be removed. Any mirrored frames still waiting for transmission shall be discarded.
requirement SWS_Mirror_00013 [SWS_Mirror_00013] 📄 PDF
Upon initialization, the Bus Mirroring module shall be inactive. No source bus is enabled.
requirement SWS_Mirror_00014 [SWS_Mirror_00014] 📄 PDF
When a source bus is enabled using Mirror_Start- SourceNetwork , frame and status acquisition from that bus shall be started, and the state of the source bus shall be reset such that it is reported directly after it has been updated for the first time.
requirement SWS_Mirror_00015 [SWS_Mirror_00015] 📄 PDF
When a source bus is disabled using Mirror_Stop- SourceNetwork , frame and status acquisition from that bus shall be stopped. Already collected frames shall still be transmitted to the destination bus.
requirement SWS_Mirror_00016 [SWS_Mirror_00016] 📄 PDF
Upon initialization, all statically configured filters of the Bus Mir- roring module are disabled, and no dynamic filters are available.
requirement SWS_Mirror_00017 [SWS_Mirror_00017] 📄 PDF
While a filter is active (statically configured and activated by Mirror_SetStaticFilterState or dynamically added using one of the bus spe- cific Mirror_Add...Filter services), all frames from the corresponding source bus that match the filter shall be mirrored.
requirement SWS_Mirror_00018 [SWS_Mirror_00018] 📄 PDF
When a statically configured filter is deactivated by Mirror_- SetStaticFilterState or a dynamically added filter is removed by Mirror_Re- moveFilter , frames that have been accepted before the deactivation/removal shall still be mirrored to the destination bus.
requirement SWS_Mirror_00019 [SWS_Mirror_00019] 📄 PDF
When Mirror_StartSourceNetwork is called to start a CAN source bus, the Bus Mirroring module shall call CanIf_EnableBusMirroring with MirroringActive set to TRUE to start reporting of received and transmitted CAN frames from the corresponding CAN controller.
requirement SWS_Mirror_00020 [SWS_Mirror_00020] 📄 PDF
When Mirror_StopSourceNetwork is called to stop a CAN source bus, the Bus Mirroring module shall call CanIf_EnableBusMirroring with MirroringActive set to FALSE to stop reporting of received and transmitted CAN frames from the corresponding CAN controller.
requirement SWS_Mirror_00021 [SWS_Mirror_00021] 📄 PDF
When Mirror_ReportCanFrame is called to report a re- ceived or transmitted CAN frame, the Bus Mirroring module shall match the canId containing the actual CAN ID, the ID type, and the frame type against all active stati- cally configured and dynamically added filters of the corresponding source bus. If the CAN frame matches at least one filter, it is accepted by the Bus Mirroring module.
requirement SWS_Mirror_00022 [SWS_Mirror_00022] 📄 PDF
A CAN mask filter statically configured as MirrorSource- CanFilterMask matches the reported canId , if this canId masked by the Mir- rorSourceCanFilterCanIdMask equals the MirrorSourceCanFilterCanId- Code .
requirement SWS_Mirror_00023 [SWS_Mirror_00023] 📄 PDF
A CAN mask filter dynamically added by a call to Mirror_- AddCanMaskFilter matches the reported canId , if this canId masked by the mask equals the id .
requirement SWS_Mirror_00024 [SWS_Mirror_00024] 📄 PDF
A CAN range filter statically configured as MirrorSource- CanFilterRange matches the reported canId , if the value of this canId is greater than or equal to the MirrorSourceCanFilterLower and smaller than or equal to the MirrorSourceCanFilterUpper .
requirement SWS_Mirror_00025 [SWS_Mirror_00025] 📄 PDF
A CAN range filter dynamically added by a call to Mirror_Ad- dCanRangeFilter matches the reported canId , if the value of this canId is greater than or equal to the lowerId and smaller than or equal to the upperId .
requirement SWS_Mirror_00026 [SWS_Mirror_00026] 📄 PDF
The Bus Mirroring module shall poll the status of each active CAN source bus by cyclically calling CanIf_GetControllerMode and CanIf_GetTrcvMode from the Mirror_MainFunction . If the returned Con- trollerModePtr is CAN_CS_STARTED and the returned TransceiverModePtr is CANTRCV_TRCVMODE_NORMAL , the reported CAN source bus state shall be set to online, otherwise to offline. If the bus is online, the Bus Mirroring module shall call CanIf_GetControllerErrorState , and if the returned Er- rorStatePtr is CAN_ERRORSTATE_PASSIVE or CAN_ERRORSTATE_BUSOFF , the reported CAN source bus state shall be set to error passive or bus-off, respec- tively. Additionally, if the bus is online, the Bus Mirroring module shall also call CanIf_GetControllerTxErrorCounter , and add the returned TxErrorCoun- terPtr to the reported CAN source bus state.
requirement SWS_Mirror_00027 [SWS_Mirror_00027] 📄 PDF
When Mirror_StartSourceNetwork is called to start a LIN source bus, the Bus Mirroring module shall call LinIf_EnableBusMirroring with MirroringActive set to TRUE to start reporting of received and transmitted LIN frames from that bus.
requirement SWS_Mirror_00028 [SWS_Mirror_00028] 📄 PDF
When Mirror_StopSourceNetwork is called to stop a LIN source bus, the Bus Mirroring module shall call LinIf_EnableBusMirroring with MirroringActive set to FALSE to stop reporting of received and transmitted LIN frames from that bus.
requirement SWS_Mirror_00029 [SWS_Mirror_00029] 📄 PDF
When Mirror_ReportLinFrame is called to report a re- ceived or transmitted LIN frame, the Bus Mirroring module shall extract the frame ID from the reported pid and match it against all active statically configured and dynam- ically added filters of the corresponding source bus. If the LIN frame matches at least one filter, it is accepted by the Bus Mirroring module.
requirement SWS_Mirror_00030 [SWS_Mirror_00030] 📄 PDF
A LIN mask filter statically configured as MirrorSourceLin- FilterMask matches the reported frame ID, if this ID masked by the Mir- rorSourceLinFilterLinIdMask equals the MirrorSourceLinFilterLinId- Code .
requirement SWS_Mirror_00031 [SWS_Mirror_00031] 📄 PDF
A LIN mask filter dynamically added by a call to Mirror_- AddLinMaskFilter matches the reported frame ID, if this ID masked by the mask equals the id .
requirement SWS_Mirror_00032 [SWS_Mirror_00032] 📄 PDF
A LIN range filter statically configured as MirrorSourceLin- FilterRange matches the reported frame ID, if the value of this ID is greater than or equal to the MirrorSourceLinFilterLower and smaller than or equal to the MirrorSourceLinFilterUpper .
requirement SWS_Mirror_00033 [SWS_Mirror_00033] 📄 PDF
A LIN range filter dynamically added by a call to Mirror_- AddLinRangeFilter matches the reported frame ID, if the value of this ID is greater than or equal to the lowerId and smaller than or equal to the upperId .
requirement SWS_Mirror_00034 [SWS_Mirror_00034] 📄 PDF
The Bus Mirroring module shall evaluate the status reported by Mirror_ReportLinFrame . If it is LIN_TX_HEADER_ERROR , LIN_TX_ERROR , LIN_RX_ERROR , or LIN_RX_NO_RESPONSE , the reported LIN source bus state shall be set to header transmission error, transmission error, reception error, or no re- sponse.
requirement SWS_Mirror_00035 [SWS_Mirror_00035] 📄 PDF
The Bus Mirroring module shall poll the status of each active LIN source bus by cyclically calling LinIf_GetTrcvMode from the Mirror_MainFunction . If the returned TransceiverModePtr is LIN- TRCV_TRCV_MODE_NORMAL , the reported LIN source bus state shall be set to online, otherwise to offline.
requirement SWS_Mirror_00036 [SWS_Mirror_00036] 📄 PDF
When Mirror_StartSourceNetwork is called to start a FlexRay source bus, the Bus Mirroring module shall call FrIf_EnableBusMirroring with FrIf_MirroringActive set to TRUE to start reporting of received and transmitted FlexRay frames from the corresponding FlexRay cluster.
requirement SWS_Mirror_00037 [SWS_Mirror_00037] 📄 PDF
When Mirror_StopSourceNetwork is called to stop a FlexRay source bus, the Bus Mirroring module shall call FrIf_EnableBusMirroring with FrIf_MirroringActive set to FALSE to stop reporting of received and transmitted FlexRay frames from the corresponding FlexRay cluster.
requirement SWS_Mirror_00038 [SWS_Mirror_00038] 📄 PDF
When Mirror_ReportFlexRayFrame is called to report a received or transmitted FlexRay frame ( txConflict is reported as FALSE), the Bus Mirroring module shall match the slotId and cycle against all active statically con- figured and dynamically added filters of the corresponding source bus. If the FlexRay frame matches at least one filter, it is accepted by the Bus Mirroring module.
requirement SWS_Mirror_00039 [SWS_Mirror_00039] 📄 PDF
A FlexRay filter statically configured as MirrorSource- FlexRayFilter matches the reported slotId and cycle if the slotId is greater than or equal to the MirrorSourceFlexRayFilterLowerSlot and smaller than or equal to the MirrorSourceFlexRayFilterUpperSlot and if the cycle modulo MirrorSourceFlexRayFilterCycleRepetition is greater than or equal to the MirrorSourceFlexRayFilterLowerBaseCycle and smaller than or equal to the MirrorSourceFlexRayFilterUpperBaseCycle .
requirement SWS_Mirror_00040 [SWS_Mirror_00040] 📄 PDF
A FlexRay filter dynamically added by a call to Mirror_- AddFlexRayFilter matches the reported slotId and cycle if the slotId is greater than or equal to the lowerSlotId and smaller than or equal to the upper- SlotId and if the cycle modulo cycleRepetition is greater than or equal to the lowerBaseCycle and smaller than or equal to the upperBaseCycle .
requirement SWS_Mirror_00041 [SWS_Mirror_00041] 📄 PDF
When Mirror_ReportFlexRayFrame is called to report a transmission conflict ( txConflict is reported as TRUE), the Bus Mirroring module shall match the slotId and cycle against all active statically configured and dynam- ically added filters. If it matches at least one filter, the reported FlexRay source bus state for that frame shall be set to transmission conflict.
requirement SWS_Mirror_00042 [SWS_Mirror_00042] 📄 PDF
The Bus Mirroring module shall poll the status of each active FlexRay source bus by cyclically calling FrIf_GetState from the Mir- ror_MainFunction . If the returned FrIf_StatePtr is FRIF_STATE_ONLINE , the reported FlexRay source bus state shall be set to online, otherwise to offline. If the bus is online, the Bus Mirroring module shall also call FrIf_GetPOCStatus for each controller connected to the FlexRay cluster. If the returned Fr_POCStateType is FR_POCSTATE_NORMAL_ACTIVE for all con- trollers, the reported source bus state shall be synchronous and normal active; if Fr_POCStateType is FR_POCSTATE_NORMAL_PASSIVE for at least one con- troller, the reported source bus state shall be synchronous but not normal active; if Fr_POCStateType is in any other state for at least one controller, the reported source bus state shall be neither synchronous nor normal active.
requirement SWS_Mirror_00043 [SWS_Mirror_00043] 📄 PDF
When the Bus Mirroring module is initialized or when Mir- ror_SwitchDestNetwork is called to activate a FlexRay ( MirrorDestNetwork- FlexRay ), CAN XL ( MirrorDestNetworkCanXL ), IP ( MirrorDestNetworkIp ), or proprietary ( MirrorDestNetworkCdd ) destination bus, the Bus Mirroring module shall activate a new destination frame buffer and reset the SequenceNumber to 0 .
requirement SWS_Mirror_00044 [SWS_Mirror_00044] 📄 PDF
When the first data item is added to an empty destina- tion frame buffer (as described in [SWS_Mirror_00045], [SWS_Mirror_00046], or [SWS_Mirror_00047]) the Bus Mirroring module shall first write the header to the buffer in the layout defined by [SWS_Mirror_00055]. The ProtocolVersion field shall be set to 1 , the SequenceNumber to the incre- mented SequenceNumber of the last destination frame, the HeaderTimestamp shall be filled with the information returned by StbM_GetCurrentTime , and the DataL- ength field shall be set to 0 . If the optional configuration parameter MirrorDestTransmissionDeadline is con- figured, the Bus Mirroring module shall start the transmission timeout timer.
requirement SWS_Mirror_00045 [SWS_Mirror_00045] 📄 PDF
When a source frame has been received as described in [SWS_Mirror_00021], [SWS_Mirror_00029], or [SWS_Mirror_00038], the Bus Mirror- ing module shall create a new data item and place it as at the end of the currently active destination frame buffer in the layout defined by [SWS_Mirror_00064], and it shall add the size of the new data item to the header field DataLength . The Timestamp field of the new data item shall be set to the difference be- tween the time stamp contained in the header and the current time acquired using StbM_GetCurrentTime expressed in multiples of 10 s , the FrameIDAvailable and PayloadAvailable bits shall be set to 1 , and the fields NetworkType , Net- workID , FrameID , PayloadLength , and Payload shall be set according to the re- ceived source frame. If the reported source bus state changed since the last transmission of a source frame, the NetworkStateAvailable bit shall be set to 1 and the NetworkState field to the reported source bus state. Otherwise, the NetworkStateAvailable bit shall be set to 0 and the NetworkState field shall be omitted.
requirement SWS_Mirror_00046 [SWS_Mirror_00046] 📄 PDF
When a new FlexRay transmission conflict was reported as described in [SWS_Mirror_00041], the Bus Mirroring module shall create a new data item and place it at the end of the currently active destination frame buffer in the layout defined by [SWS_Mirror_00064], and it shall add the size of the new data item to the header field DataLength . The Timestamp field of the data item shall be set to the difference between the time stamp contained in the header and the current time acquired using StbM_GetCurrentTime expressed in multiples of 10 s , the FrameIDAvailable and NetworkStateAvailable bits shall be set to 1 , and the fields NetworkType , NetworkID , and FrameID shall be set according to the reported transmission conflict. The NetworkState field shall be set to the reported source bus state. The PayloadAvailable bit shall be set to 0 , and the fields PayloadLength and Payload shall be omitted.
requirement SWS_Mirror_00047 [SWS_Mirror_00047] 📄 PDF
When the reported source bus state has changed and if no source frame is received from the same source bus within one main function cycle, the Bus Mirroring module shall create a new data item and place it at the end of the currently active destination frame buffer in the layout defined by [SWS_Mirror_00064], and it shall add the size of the new data item to the header field DataLength . The Timestamp field of the data item shall be set to the difference between the time stamp contained in the header and the current time acquired us- ing StbM_GetCurrentTime expressed in multiples of 10 s . The Network- StateAvailable bit shall be set to 1 , the fields NetworkType and NetworkID shall be set according to the reported source bus, and the NetworkState field shall be set to the reported source bus state. Depending on the currently reported source bus state, the FrameIDAvailable shall be set to 1 or 0 . In the first case, the FrameID shall be set according to the reported source bus, and in the latter case the FrameID shall be omitted. The PayloadAvailable bit shall be set to 0 , and the fields PayloadLength and Payload shall be omitted.
requirement SWS_Mirror_00048 [SWS_Mirror_00048] 📄 PDF
When a data item does not fit in the remaining space of the cur- rently active destination frame buffer, the Bus Mirroring module shall place this buffer in the queue and activate a new destination frame buffer. The data item shall then be placed in the new buffer.
requirement SWS_Mirror_00049 [SWS_Mirror_00049] 📄 PDF
When the relative time stamp of a data item exceeds 655 : 35 ms , the Bus Mirroring module shall place the currently active destination frame buffer in the queue and activate a new destination frame buffer. The data item shall then be placed in the new buffer.
requirement SWS_Mirror_00050 [SWS_Mirror_00050] 📄 PDF
If the optional configuration parameter MirrorDestTrans- missionDeadline is configured and the transmission timeout expires, the Bus Mir- roring module shall place the currently active destination frame buffer in the queue and active a new destination frame buffer.
requirement SWS_Mirror_00051 [SWS_Mirror_00051] 📄 PDF
To initiate the transmission of a queued serialized desti- nation frame, the Bus Mirroring module shall call PduR_MirrorTransmit with PduInfoPtr->MetaDataPtr set to the NULL_PTR and PduInfoPtr->SduLength set to the actually written part of the destination frame. If MirrorDestPduUsesTrig- gerTransmit is enabled, PduInfoPtr->SduDataPtr shall be set to the NULL_PTR , otherwise to the used part of the queued destination frame.
requirement SWS_Mirror_00052 [SWS_Mirror_00052] 📄 PDF
In case the active destination channel is MirrorDestNet- workCanXL , MirrorDestNetworkIp or MirrorDestNetworkCdd , the Bus Mirror- ing module shall not transmit the next serialized destination frame before the previ- ous destination frame has been confirmed by a call to Mirror_TxConfirmation .
requirement SWS_Mirror_00053 [SWS_Mirror_00053] 📄 PDF
The Bus Mirroring module shall initiate the transmission of queued serialized destination frames from the Mirror_MainFunction and from the Mirror_TxConfirmation callback.
requirement SWS_Mirror_00054 [SWS_Mirror_00054] 📄 PDF
When Mirror_TriggerTransmit is called for a serialized destination frame, the Mirror module shall copy the used part of the queued destina- tion frame to PduInfoPtr->SduDataPtr and update PduInfoPtr->SduLength accordingly.
requirement SWS_Mirror_00055 [SWS_Mirror_00055] 📄 PDF
The header of a Bus Mirroring destination frame shall contain the following fields in this order: 1. ProtocolVersion 2. SequenceNumber 3. HeaderTimestamp 4. DataLength
requirement SWS_Mirror_00056 [SWS_Mirror_00056] 📄 PDF
The ProtocolVersion shall indicate the layout of the header and the data items. The layout currently defined in this section is identified by Proto- colVersion 1 . The range [2 : : 127] is reserved for future extensions of the AUTOSAR defined protocol, the range [128 : : 255] is available for customer specific protocols.
requirement SWS_Mirror_00057 [SWS_Mirror_00057] 📄 PDF
The width of the ProtocolVersion field shall be 8 bits.
requirement SWS_Mirror_00058 [SWS_Mirror_00058] 📄 PDF
The SequenceNumber shall increase with each transmission of a destination frame. After initialization or after switching the destination bus with Mirror_SwitchDestNetwork , it shall start from 0 .
requirement SWS_Mirror_00059 [SWS_Mirror_00059] 📄 PDF
The width of the SequenceNumber field shall be 8 bits.
requirement SWS_Mirror_00060 [SWS_Mirror_00060] 📄 PDF
The HeaderTimestamp shall reflect the time when collection of data items into the destination frame started. This time shall be given as the absolute number of seconds and nanoseconds since January 1 st of 1970.
requirement SWS_Mirror_00061 [SWS_Mirror_00061] 📄 PDF
The width of the HeaderTimestamp field shall be 10 bytes, the layout is shown in Table 7.1. The elements of the the HeaderTimestamp field shall be encoded in network byte order (MSB first).
requirement SWS_Mirror_00062 [SWS_Mirror_00062] 📄 PDF
The DataLength shall give the number of bytes following the header. It is the sum of the length of all data items in the destination frame.
requirement SWS_Mirror_00063 [SWS_Mirror_00063] 📄 PDF
The width of the DataLength field shall be 16 bits. It shall be encoded in network byte order (MSB first).
requirement SWS_Mirror_00064 [SWS_Mirror_00064] 📄 PDF
Data items of a Bus Mirroring destination frame shall contain the following fields in this order: 1. Timestamp 2. NetworkStateAvailable 3. FrameIDAvailable 4. PayloadAvailable 5. NetworkType 6. NetworkID 7. NetworkState (optional) 8. FrameID (optional) 9. PayloadLength (optional) 10. Payload (optional)
requirement SWS_Mirror_00065 [SWS_Mirror_00065] 📄 PDF
The Timestamp shall reflect the temporal offset of the source frame reception from the HeaderTimestamp , i.e. the time that passed since collection of data items into the destination frame started. It shall be given in multiples of 10 s .
requirement SWS_Mirror_00066 [SWS_Mirror_00066] 📄 PDF
The width of the Timestamp field shall be 16 bits. It shall be encoded in network byte order (MSB first).
requirement SWS_Mirror_00067 [SWS_Mirror_00067] 📄 PDF
The NetworkStateAvailable shall indicate whether the field NetworkState is present in the data item. If NetworkStateAvailable is 1, that field shall be present. If it is 0, that field shall be omitted.
requirement SWS_Mirror_00068 [SWS_Mirror_00068] 📄 PDF
The width of the NetworkStateAvailable field shall be 1 bit.
requirement SWS_Mirror_00069 [SWS_Mirror_00069] 📄 PDF
The FrameIDAvailable shall indicate whether the field FrameID is present in the data item. If FrameIDAvailable is 1, that field shall be present. If it is 0, that field shall be omitted.
requirement SWS_Mirror_00070 [SWS_Mirror_00070] 📄 PDF
The width of the FrameIDAvailable field shall be 1 bit.
requirement SWS_Mirror_00071 [SWS_Mirror_00071] 📄 PDF
The PayloadAvailable shall indicate whether the fields PayloadLength and Payload are present in the data item. If PayloadAvailable is 1, these fields shall be present. If it is 0, these fields shall be omitted.
requirement SWS_Mirror_00072 [SWS_Mirror_00072] 📄 PDF
The width of the PayloadAvailable field shall be 1 bit.
requirement SWS_Mirror_00073 [SWS_Mirror_00073] 📄 PDF
The NetworkType shall indicate the type of the source bus.
requirement SWS_Mirror_00074 [SWS_Mirror_00074] 📄 PDF
The width of the NetworkType field shall be 5 bits, the possi- ble values are shown in Table 7.2. The range [5 : : 15] is reserved for future extensions of the AUTOSAR defined protocol, the range [16 : : 31] is available for customer specific bus types.
requirement SWS_Mirror_00075 [SWS_Mirror_00075] 📄 PDF
The NetworkID shall identify a bus of a certain NetworkType uniquely, i.e. the same NetworkID can appear on different NetworkTypes , but not on the same NetworkType .
requirement SWS_Mirror_00076 [SWS_Mirror_00076] 📄 PDF
The width of the NetworkID field shall be 8 bits.
requirement SWS_Mirror_00077 [SWS_Mirror_00077] 📄 PDF
The NetworkState shall provide information about the source bus state. It shall only be present when the source bus state has changed since the last time it was reported, the presence shall be indicated by Network- StateAvailable .
requirement SWS_Mirror_00078 [SWS_Mirror_00078] 📄 PDF
The width of the NetworkState field shall be 8 bits, the lay- out is bus specific and is defined separately for each bus as NetworkStateCAN , NetworkStateLIN , and NetworkStateFlexRay .
requirement SWS_Mirror_00079 [SWS_Mirror_00079] 📄 PDF
Bit 7 (the most significant bit) of the NetworkState shall al- ways contain the Frames Lost state. This is a sporadic error that is not related to the source frame that is reported in the same data item, but shall not be reported in a separate data item. The Frames Lost state shall be set once to 1 after one or more source frames that passed the filters were lost because the queue of the destination bus was full or the transmission failed. Afterwards it shall be set to 0 again.
requirement SWS_Mirror_00080 [SWS_Mirror_00080] 📄 PDF
Bit 6 of the NetworkState shall always contain the Bus Online state. This is a continuous state that is not related to the source frame that is reported in the same data item, and may also be reported in a data item where the FrameIDA- vailable and PayloadAvailable fields are set to 0 . The Bus Online state shall be set to 1 when the source bus is online, i.e. when both the controller and the transceiver are able to communicate. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00081 [SWS_Mirror_00081] 📄 PDF
Bit 5 of the NetworkStateCAN shall contain the Error-Passive state. This is a continuous state that is not related to the source frame that is reported in the same data item, and may also be reported in a data item where the FrameIDA- vailable and PayloadAvailable fields are set to 0 . The Error-Passive state shall be set to 1 when the CAN controller is in the Error-Passive state, and to 0 when it is in the Error-Active or Bus-Off state.
requirement SWS_Mirror_00082 [SWS_Mirror_00082] 📄 PDF
Bit 4 of the NetworkStateCAN shall contain the Bus-Off state. This is a continuous state that is not related to the source frame that is reported in the same data item, and may also be reported in a data item where the FrameIDAvail- able and PayloadAvailable fields are set to 0 . The Bus-Off state shall be set to 1 when the CAN controller is in the Bus-Off state, and to 0 when it is in the Error-Active or Error-Passive state.
requirement SWS_Mirror_00083 [SWS_Mirror_00083] 📄 PDF
Bits 3 – 0 of the NetworkStateCAN shall contain the Tx error counter of the can controller divided by 8 . This is a continuous state that is not related to the source frame that is reported in the same data item, and may also be reported in a data item where the FrameIDAvailable and PayloadAvailable fields are set to 0 .
requirement SWS_Mirror_00084 [SWS_Mirror_00084] 📄 PDF
Bits 5 and 4 of the NetworkStateLIN are currently reserved. They shall always be set to 0 .
requirement SWS_Mirror_00085 [SWS_Mirror_00085] 📄 PDF
Bit 3 of the NetworkStateLIN shall contain the Header Tx Error state. This is an error that is related to the source frame that is reported in the same data item. The Header Tx Error state shall be set to 1 when the LIN controller detected an error during transmission of a LIN header. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00086 [SWS_Mirror_00086] 📄 PDF
Bit 2 of the NetworkStateLIN shall contain the Tx Error state. This is an error that is related to the source frame that is reported in the same data item. The Tx Error state shall be set to 1 when the LIN controller detected an error during transmission of a LIN frame. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00087 [SWS_Mirror_00087] 📄 PDF
Bit 1 of the NetworkStateLIN shall contain the Rx Error state. This is an error that is related to the source frame that is reported in the same data item. The Rx Error state shall be set to 1 when the LIN controller detected an error during reception of a LIN frame. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00088 [SWS_Mirror_00088] 📄 PDF
Bit 0 of the NetworkStateLIN shall contain the Header Rx No Response state. This is an error that is related to the source frame that is reported in the same data item. The Rx No Response state shall be set to 1 when the LIN controller did not receive the expected LIN frame after transmission of a LIN header. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00089 [SWS_Mirror_00089] 📄 PDF
Bit 5 of the NetworkStateFlexRay shall contain the Bus Synchronous state. This is a continuous state that is not related to the source frame that is reported in the same data item, and may also be reported in a data item where the FrameIDAvailable and PayloadAvailable fields are set to 0 . The Bus Synchronous state shall be set to 1 when all FlexRay controllers connected to that bus are synchronous to the network time. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00090 [SWS_Mirror_00090] 📄 PDF
Bit 4 of the NetworkStateFlexRay shall contain the Normal Active state. This is a continuous state that is not related to the source frame that is reported in the same data item, and may also be reported in a data item where the FrameIDAvailable and PayloadAvailable fields are set to 0 . The Normal Active state shall be set to 1 when all FlexRay controllers connected to that bus are synchronous and in the normal active state. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00091 [SWS_Mirror_00091] 📄 PDF
Bit 3 of the NetworkStateFlexRay shall contain the Syntax Error state. This is an aggregated error flag of the FlexRay channels that is related to the channel assignment of the FrameID , but not to a source frame and its FrameID that is reported in the same data item. It may also be reported in a data item where the PayloadAvailable field is set to 0 and the FrameIDAvailable is set to 1 with the slot valid flag of the FrameID set to 0 . The Syntax Error state shall be set to 1 once after a FlexRay controller detected a syntax error. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00092 [SWS_Mirror_00092] 📄 PDF
Bit 2 of the NetworkStateFlexRay shall contain the Content Error state. This is an aggregated error flag of the FlexRay channels that is related to the channel assignment of the FrameID , but not to a source frame and its FrameID that is reported in the same data item. It may also be reported in a data item where the PayloadAvailable field is set to 0 and the FrameIDAvailable is set to 1 with the slot valid flag of the FrameID set to 0 . The Content Error state shall be set to 1 once after a FlexRay controller detected a content error. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00093 [SWS_Mirror_00093] 📄 PDF
Bit 1 of the NetworkStateFlexRay shall contain the Bound- ary Violation state. This is an aggregated error flag of the FlexRay channels that is related to the channel assignment of the FrameID , but not to a source frame and its FrameID that is reported in the same data item. It may also be reported in a data item where the PayloadAvailable field is set to 0 and the FrameIDAvailable is set to 1 with the slot valid flag of the FrameID set to 0 . The Boundary Violation state shall be set to 1 once after a FlexRay controller detected a boundary violation. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00094 [SWS_Mirror_00094] 📄 PDF
Bit 0 of the NetworkStateFlexRay shall contain the Tx Con- flict state. This is an error that is related to the previous source frame that was reported with the same FrameID and is always reported in a data item where the FrameIDA- vailable field is set to 1 and the PayloadAvailable field is set to 0 . The Tx Conflict state shall be set to 1 when a FlexRay controller detected a transmis- sion conflict. Otherwise it shall be set to 0 .
requirement SWS_Mirror_00095 [SWS_Mirror_00095] 📄 PDF
The FrameID shall provide the identification of the source frame. This identification shall be unique for one source bus identified by Network- Type and NetworkID . The FrameID may be omitted when reporting a source bus state change, the presence shall be indicated by FrameIDAvailable .
requirement SWS_Mirror_00096 [SWS_Mirror_00096] 📄 PDF
The width and layout of the FrameID field is bus specific and is defined separately for each bus as FrameIDCAN , FrameIDLIN , and FrameID- FlexRay .
requirement SWS_Mirror_00097 [SWS_Mirror_00097] 📄 PDF
The width of the FrameIDCAN field shall be 4 bytes.
requirement SWS_Mirror_00098 [SWS_Mirror_00098] 📄 PDF
Bit 7 of Byte 0 of the FrameIDCAN shall be set to 1 for an Extended CAN ID and to 0 for a Standard CAN ID.
requirement SWS_Mirror_00099 [SWS_Mirror_00099] 📄 PDF
Bit 6 of Byte 0 of the FrameIDCAN shall be set to 1 for a CAN- FD frame and to 0 for a CAN 2.0 frame.
requirement SWS_Mirror_00100 [SWS_Mirror_00100] 📄 PDF
Bit 5 of Byte 0 of the FrameIDCAN is currently reserved. It shall always be set 0 .
requirement SWS_Mirror_00101 [SWS_Mirror_00101] 📄 PDF
Bits 4 – 0 of Byte 0 and Bytes 1 – 3 of the FrameIDCAN shall contain the CAN ID of the reported CAN frame in network byte order (MSB first).
requirement SWS_Mirror_00102 [SWS_Mirror_00102] 📄 PDF
The width of the FrameIDLIN field shall be 1 byte.
requirement SWS_Mirror_00103 [SWS_Mirror_00103] 📄 PDF
Byte 0 of the FrameIDLIN shall contain the LIN PID of the reported LIN frame.
requirement SWS_Mirror_00104 [SWS_Mirror_00104] 📄 PDF
The width of the FrameIDFlexRay field shall be 3 bytes.
requirement SWS_Mirror_00105 [SWS_Mirror_00105] 📄 PDF
Bits 7 – 6 of Byte 0 of the FrameIDFlexRay shall contain the channel assignment of the reported FlexRay frame. Bit 7 shall be set to 1 if the reported FlexRay frame is available on channel B of the FlexRay controller, otherwise it shall be set to 0 . Bit 6 shall be set to 1 if the reported FlexRay frame is available on channel A of the FlexRay controller, otherwise it shall be set to 0 . A reported FlexRay frame is either assigned exclusively to channel A or B or to both channels.
requirement SWS_Mirror_00106 [SWS_Mirror_00106] 📄 PDF
Bits 5 – 4 of Byte 0 of the FrameIDFlexRay are currently reserved. They shall always be set 0 .
requirement SWS_Mirror_00107 [SWS_Mirror_00107] 📄 PDF
Bits 2 – 0 of Byte 0 and Byte 1 of the FrameIDFlexRay shall contain the slot ID of the reported FlexRay frame in network byte order (MSB first).
requirement SWS_Mirror_00108 [SWS_Mirror_00108] 📄 PDF
Byte 2 of the FrameIDFlexRay shall contain the cycle in which the reported FlexRay frame was sent or received.
requirement SWS_Mirror_00109 [SWS_Mirror_00109] 📄 PDF
The PayloadLength shall provide the length of the payload of the source frame. It may be omitted when reporting a source bus state change, the presence shall be indicated by PayloadAvailable .
requirement SWS_Mirror_00110 [SWS_Mirror_00110] 📄 PDF
The width of the PayloadLength field shall be 8 bits.
requirement SWS_Mirror_00111 [SWS_Mirror_00111] 📄 PDF
The Payload shall provide the actual payload of the source frame. It may be omitted when reporting a source bus state change, the presence shall be indicated by PayloadAvailable .
requirement SWS_Mirror_00112 [SWS_Mirror_00112] 📄 PDF
The width of the Payload field shall correspond to the reported source frame. The maximum values are 8 bytes for LIN and CAN 2.0, 64 bytes for CAN-FD, and 254 for FlexRay.
requirement SWS_Mirror_00113 [SWS_Mirror_00113] 📄 PDF
If a destination frame cannot be placed in the queue because the queue is already full, the Bus Mirroring module shall drop that destination frame, report the runtime error MIRROR_E_QUEUE_OVERRUN , and shall set (to 1 ) the Frames Lost bit of the NetworkState of the next data item created in the currently active destination frame buffer.
requirement SWS_Mirror_00114 [SWS_Mirror_00114] 📄 PDF
If the canId of a CAN source frame matches the Mirror- SourceCanSingleIdMappingSourceCanId of a MirrorSourceCanSingleI- dMapping , the destination frame shall be transmitted with the MirrorSourceCanS- ingleIdMappingDestCanId of that mapping.
requirement SWS_Mirror_00115 [SWS_Mirror_00115] 📄 PDF
If the canId of a CAN source frame masked by the Mirror- SourceCanMaskBasedIdMappingSourceCanIdMask of a MirrorSourceCan- MaskBasedIdMapping matches the MirrorSourceCanMaskBasedIdMapping- SourceCanIdCode of that mapping, the CAN destination frame shall be transmit- ted with the masked canId added to the MirrorSourceCanMaskBasedIdMap- pingDestBaseId .
requirement SWS_Mirror_00116 [SWS_Mirror_00116] 📄 PDF
If the canId of a CAN source frame matches neither a Mir- rorSourceCanSingleIdMapping nor a MirrorSourceCanMaskBasedIdMap- ping , the CAN destination frame shall be transmitted with the original canId , i.e. identical CAN ID, ID type (Extended or Standard), and frame type (CAN-FD or CAN 2.0).
requirement SWS_Mirror_00117 [SWS_Mirror_00117] 📄 PDF
If the frame ID extracted from the pid of a LIN source frame matches the MirrorSourceLinToCanIdMappingLinId of a MirrorSourceLin- ToCanIdMapping , the CAN destination frame shall be transmitted with the Mirror- SourceLinToCanIdMappingCanId of that mapping.
requirement SWS_Mirror_00118 [SWS_Mirror_00118] 📄 PDF
If the frame ID extracted from the pid of a LIN source frame matches no MirrorSourceLinToCanIdMapping , the CAN destination frame shall be transmitted with the LIN frame ID added to the MirrorSourceLinToCanBaseId .
requirement SWS_Mirror_00119 [SWS_Mirror_00119] 📄 PDF
The Bus Mirroring module shall place all CAN destination frames in the queue.
requirement SWS_Mirror_00120 [SWS_Mirror_00120] 📄 PDF
If a destination frame cannot be placed in the queue because the queue is already full, the Bus Mirroring module shall drop that destination frame, report the runtime error MIRROR_E_QUEUE_OVERRUN , and set (to 1 ) the Frames Lost bit of the NetworkState in the next status frame.
requirement SWS_Mirror_00121 [SWS_Mirror_00121] 📄 PDF
To initiate the transmission of a queued CAN destination frame, the Bus Mirroring module shall call PduR_MirrorTransmit with PduInfoPtr- >MetaDataPtr set to MetaData containing the CAN ID of the destination frame and PduInfoPtr->SduLength set to the length of the destination frame. If MirrorDestPduUsesTriggerTransmit is enabled, PduInfoPtr->SduDataPtr shall be set to the NULL_PTR , otherwise to the payload of the source frame.
requirement SWS_Mirror_00122 [SWS_Mirror_00122] 📄 PDF
When Mirror_TriggerTransmit is called for a CAN desti- nation frame, the Mirror module shall copy the payload of the source frame to PduIn- foPtr->SduDataPtr and update PduInfoPtr->SduLength accordingly.
requirement SWS_Mirror_00123 [SWS_Mirror_00123] 📄 PDF
If MirrorStatusCanId is configured and when one or more source bus states have changed, the Bus Mirroring module shall allocate a new status frame buffer and write the header in the layout defined by [SWS_Mirror_00127]. The SHProtocolVersion field shall be set to 1 .
requirement SWS_Mirror_00124 [SWS_Mirror_00124] 📄 PDF
If MirrorStatusCanId is configured, the Bus Mirroring mod- ule shall create a new status item for each source bus where the reported state has changed and place it at the end of the currently active status frame buffer in the layout defined by [SWS_Mirror_00129]. The fields SINetworkType and SINetworkID shall be set according to the reported source bus, the SINetworkState field shall be set to the reported source bus state. Depending on the currently reported source bus state, the SIFrameIDAvailable shall be set to 1 or 0 . In the first case, the SIFrameID shall be set according to the reported source bus, and in the latter case the SIFrameID shall be omitted.
requirement SWS_Mirror_00125 [SWS_Mirror_00125] 📄 PDF
When a status item does not fit in the remaining space of the currently active status frame buffer, the Bus Mirroring module shall place this buffer in the queue with the CAN ID configured in MirrorStatusCanId and activate a new status frame buffer.
requirement SWS_Mirror_00126 [SWS_Mirror_00126] 📄 PDF
When status items have been written for all source buses where the reported state has changed, the Bus Mirroring module shall place the cur- rently active status frame buffer in the queue with the CAN ID configured in Mir- rorStatusCanId .
requirement SWS_Mirror_00127 [SWS_Mirror_00127] 📄 PDF
The header of a Bus Mirroring status frame shall contain the SHProtocolVersion .
requirement SWS_Mirror_00128 [SWS_Mirror_00128] 📄 PDF
The SHProtocolVersion shall be identical to the Proto- colVersion of a serialized destination frame.
requirement SWS_Mirror_00129 [SWS_Mirror_00129] 📄 PDF
Status items of a Bus Mirroring status frame shall contain the following fields in this order: 1. SINetworkStateAvailable 2. SIFrameIDAvailable 3. reserved 4. SINetworkType 5. SINetworkID 6. SINetworkState 7. SIFrameID (optional)
requirement SWS_Mirror_00131 [SWS_Mirror_00131] 📄 PDF
The layout and semantics of the SIFrameIDAvailable shall be identical to the FrameIDAvailable used in a serialized data item.
requirement SWS_Mirror_00132 [SWS_Mirror_00132] 📄 PDF
Bit 5 of Byte 0 of the status item is currently reserved and shall always be set to 0 .
requirement SWS_Mirror_00133 [SWS_Mirror_00133] 📄 PDF
The layout and semantics of the SINetworkType shall be identical to the NetworkType used in a serialized data item.
requirement SWS_Mirror_00134 [SWS_Mirror_00134] 📄 PDF
The layout and semantics of the SINetworkID shall be iden- tical to the NetworkID used in a serialized data item.
requirement SWS_Mirror_00135 [SWS_Mirror_00135] 📄 PDF
The layout and semantics of the SINetworkState shall be identical to the NetworkState used in a serialized data item.
requirement SWS_Mirror_00136 [SWS_Mirror_00136] 📄 PDF
The layout and semantics of the SIFrameID shall be identical to the FrameID used in a serialized data item.
requirement SWS_Mirror_00137 [SWS_Mirror_00137] 📄 PDF
If development error detection is enabled by MirrorDevEr- rorDetect , the Bus Mirroring module shall check the TxPduId of the callback func- tions Mirror_TxConfirmation and Mirror_TriggerTransmit against Mir- rorDestPduId , and shall report the development error MIRROR_E_INVALID_PDU_- SDU_ID when an unknown ID is provided by the call.
requirement SWS_Mirror_00138 [SWS_Mirror_00138] 📄 PDF
If development error detection is enabled by MirrorDevEr- rorDetect , the Bus Mirroring module shall check the NetworkHandleType pa- rameters of its service functions against the ComMChannelId referenced via Mir- rorComMNetworkHandleRef , and shall report the development error MIRROR_E_- INVALID_NETWORK_ID when an unknown network handle is provided by the call.
requirement SWS_Mirror_00142 [SWS_Mirror_00142] 📄 PDF
The Bus Mirroring module shall include the header file CanIf.h if at least one MirrorSourceNetworkCan is configured.
requirement SWS_Mirror_00143 [SWS_Mirror_00143] 📄 PDF
The Bus Mirroring module shall include the header file LinIf.h if at least one MirrorSourceNetworkLin is configured.
requirement SWS_Mirror_00144 [SWS_Mirror_00144] 📄 PDF
The Bus Mirroring module shall include the header file FrIf.h if at least one MirrorSourceNetworkFlexRay is configured.
requirement SWS_Mirror_00146 [SWS_Mirror_00146] 📄 PDF
When Mirror_ReportFlexRayChannelStatus is called to report the FlexRay channel state, the Bus Mirroring module shall compare the reported states with the previously reported states. It the states differ in Bit 1 (vSS!SyntaxError), Bit 2 (vSS!ContentError), and/or Bit 4 (vSS!Bviolation), the Bus Mirroring module shall update the reported FlexRay source bus state accordingly.
requirement SWS_Mirror_00147 [SWS_Mirror_00147] 📄 PDF
The Bus Mirroring module shall include the header file StbM.h if at least one MirrorDestNetworkFlexRay , MirrorDestNetworkCanXL , Mir- rorDestNetworkIp , or MirrorDestNetworkCdd is configured.
requirement SWS_Mirror_00149 [SWS_Mirror_00149] 📄 PDF
The layout and semantics of the SINetworkStateAvail- able shall be identical to the NetworkStateAvailable used in a serialized data item. It shall always be set to 1 .
requirement SWS_Mirror_00150 [SWS_Mirror_00150] 📄 PDF
If the PduR_MirrorTransmit returns E_NOT_OK , the Bus Mirroring module shall immediately remove the destination frame from the queue, shall report the runtime error MIRROR_E_TRANSMIT_FAILED , and shall set (to 1 ) the Frames Lost bit of the NetworkState of the next data item created in the currently active destination frame buffer.
requirement SWS_Mirror_00151 [SWS_Mirror_00151] 📄 PDF
If the PduInfoPtr->SduLength provided by Mirror_- TriggerTransmit is too small for the currently transmitted serialized destination frame, the Bus Mirroring module shall remove the destination frame from the queue, shall report the runtime error MIRROR_E_TRANSMIT_FAILED , shall set (to 1 ) the Frames Lost bit of the NetworkState of the next data item created in the currently active serialized destination frame buffer, and shall return E_NOT_OK to stop this trans- mission.
requirement SWS_Mirror_00152 [SWS_Mirror_00152] 📄 PDF
When Mirror_TxConfirmation is called to report the suc- cessful or failed transmission of a serialized destination frame, the Bus Mirroring mod- ule shall remove the destination frame from the queue.
requirement SWS_Mirror_00153 [SWS_Mirror_00153] 📄 PDF
If the Mirror_TxConfirmation reports the failed transmis- sion of a serialized destination frame ( result is E_NOT_OK ), the Bus Mirroring module shall report the runtime error MIRROR_E_TRANSMIT_FAILED , and shall set (to 1 ) the Frames Lost bit of the NetworkState of the next data item created in the currently active destination frame buffer.
requirement SWS_Mirror_00154 [SWS_Mirror_00154] 📄 PDF
If the PduR_MirrorTransmit returns E_NOT_OK , the Bus Mirroring module shall immediately remove the destination frame from the queue, shall report the runtime error MIRROR_E_TRANSMIT_FAILED , and shall set (to 1 ) the Frames Lost bit of the NetworkState of the next status frame.
requirement SWS_Mirror_00155 [SWS_Mirror_00155] 📄 PDF
The Bus Mirroring module shall initiate the transmission of queued CAN destination frames from the Mirror_MainFunction and from the Mir- ror_TxConfirmation callback.
requirement SWS_Mirror_00156 [SWS_Mirror_00156] 📄 PDF
The Bus Mirroring module shall not transmit the next CAN des- tination frame before the previous destination frame has been confirmed by a call to Mirror_TxConfirmation .
requirement SWS_Mirror_00157 [SWS_Mirror_00157] 📄 PDF
When Mirror_TxConfirmation is called to report the suc- cessful or failed transmission of a CAN destination frame, the Bus Mirroring module shall remove the destination frame from the queue.
requirement SWS_Mirror_00158 [SWS_Mirror_00158] 📄 PDF
If the Mirror_TxConfirmation reports the failed transmis- sion of a CAN destination frame ( result is E_NOT_OK ), the Bus Mirroring module shall report the runtime error MIRROR_E_TRANSMIT_FAILED , and shall set (to 1 ) the Frames Lost bit of the NetworkState of the next status frame.
requirement SWS_Mirror_00159 [SWS_Mirror_00159] 📄 PDF
Bit 3 of Byte 0 of the FrameIDFlexRay shall contain a flag indicating whether the reported slot ID and cycle are valid (flag is 1 ) or unused (flag is 0 ). It shall only be set to 0 when an aggregated error of the FlexRay channels is reported independently of a source frame or transmission conflict. Otherwise it shall always be set to 1 .
requirement SWS_Mirror_00160 [SWS_Mirror_00160] 📄 PDF
If a set of MirrorDestPdu s is configured for a MirrorDest- NetworkFlexRay , the Bus Mirroring module shall use the PDUs of this set in arbitrary order.
requirement SWS_Mirror_00161 [SWS_Mirror_00161] 📄 PDF
In case the active destination channel is MirrorDestNet- workFlexRay , the Bus Mirroring module shall not transmit the next serialized des- tination frame using the same MirrorDestPdu before the previous transmission of that MirrorDestPdu has been confirmed by a call to Mirror_TxConfirmation .
requirement SWS_Mirror_00165 [SWS_Mirror_00165] 📄 PDF
This type represents a special value of NetworkHandleType, representing an invalid network handle.
requirement SWS_Mirror_00166 [SWS_Mirror_00166] 📄 PDF
The Bus Mirroring module shall call interfaces of the CAN, LIN, and FlexRay Interface modules only from within the same partition, to which the ComM- Channel referenced by MirrorSourceNetwork is assigned to.
requirement SWS_Mirror_00167 [SWS_Mirror_00167] 📄 PDF
The Bus Mirroring module shall apply appropriate mechanisms to allow calls of Mirror_ReportCanFrame from the partition to which the ComM- Channel referenced by MirrorComMNetworkHandleRef is assigned to, e.g. by pro- viding a satellite in this partition.
requirement SWS_Mirror_00168 [SWS_Mirror_00168] 📄 PDF
The Bus Mirroring module shall apply appropriate mechanisms to allow calls of Mirror_ReportLinFrame from the partition to which the ComM- Channel referenced by MirrorComMNetworkHandleRef is assigned to, e.g. by pro- viding a satellite in this partition.
requirement SWS_Mirror_00169 [SWS_Mirror_00169] 📄 PDF
The Bus Mirroring module shall apply appropriate mechanisms to allow calls of Mirror_ReportFlexRayFrame from the partition to which the ComMChannel referenced by MirrorComMNetworkHandleRef is assigned to, e.g. by providing a satellite in this partition.
requirement SWS_Mirror_01031 [SWS_Mirror_01031] 📄 PDF
Provided port for the interface MirrorControl. Variation –
requirement SWS_Mirror_01033 [SWS_Mirror_01033] 📄 PDF
Name MirrorControl Comment Provides access to the control functions of the Bus Mirroring module. IsService true Variation – 0 E_OK Operation successful Possible Errors 1 E_NOT_OK Operation failed Operation AddCanMaskFilter Comment Creates a CAN ID mask filter. Mapped to API Mirror_AddCanMaskFilter Variation – network Type NetworkHandleType Direction IN Parameters Comment ComM channel that corresponds to the CAN bus to which the filter shall be attached. Variation – filterId Type uint8* Direction OUT Comment ID of the newly created filter. Variation – id Type Can_IdType Direction IN Comment CAN ID used to match a received or transmitted CAN ID. Variation – mask Type Can_IdType Direction IN Comment Mask that defines the bits of 'id' that are relevant for comparison with the actual CAN ID. Variation – Possible Errors E_OK E_NOT_OK Operation AddCanRangeFilter Comment Creates a CAN ID range filter. Mapped to API Mirror_AddCanRangeFilter Variation – network Type NetworkHandleType Direction IN Comment ComM channel that corresponds to the CAN bus to which the filter shall be attached. Variation – filterId Type uint8* Direction OUT Comment ID of the newly created filter. Variation – lowerId Type Can_IdType Direction IN Comment Lower CAN ID of the range. Variation – upperId Type Can_IdType Direction IN Comment Upper CAN ID of the range. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation AddFlexRayFilter Comment Creates a FlexRay filter. Mapped to API Mirror_AddFlexRayFilter Variation – network Type NetworkHandleType Direction IN Comment ComM channel that corresponds to the FlexRay bus to which the filter shall be attached. Variation – filterId Type uint8* Direction OUT Comment ID of the newly created filter. Variation – lowerSlotId Type uint16 Direction IN Comment Lower slot ID of a range of slot IDs. Variation – upperSlotId Type uint16 Direction IN Comment Upper slot ID of a range of slot IDs. Variation – lowerBaseCycle Type uint8 Direction IN Comment Lower base cycle of a range of cycles. Variation – upperBaseCycle Type uint8 Direction IN Comment Upper base cycle of a range of cycles. Variation – cycleRepetition Type uint8 Direction IN Comment Repetition pattern of selected cycles (2n). Variation – frChannel Type Fr_ChannelType Direction IN Comment FlexRay channel assignment. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation AddLinMaskFilter Comment Creates a LIN frame ID mask filter. Mapped to API Mirror_AddLinMaskFilter Variation – network Type NetworkHandleType Direction IN Comment ComM channel that corresponds to the LIN bus to which the filter shall be attached. Variation – filterId Type uint8* Direction OUT Comment ID of the newly created filter. Variation – id Type uint8 Direction IN Comment Frame ID used to match a received or transmitted frame ID. Variation – mask Type uint8 Direction IN Comment Mask that defines the bits of 'id' that are relevant for comparison with the actual frame ID. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation AddLinRangeFilter Comment Creates a LIN frame ID range filter. Mapped to API Mirror_AddLinRangeFilter Variation – network Type NetworkHandleType Direction IN Comment ComM channel that corresponds to the LIN bus to which the filter shall be attached. Variation – filterId Type uint8* Direction OUT Comment ID of the newly created filter. Variation – lowerId Type uint8 Direction IN Parameters Comment Lower frame ID of the range. Variation – upperId Type uint8 Direction IN Comment Upper frame ID of the range. Variation – Possible Errors E_OK E_NOT_OK Operation GetDestNetwork Comment Returns the currently selected destination bus. Mapped to API Mirror_GetDestNetwork Variation – network Type NetworkHandleType Direction OUT Comment ComM channel that corresponds to the currently active destination network. Parameters Variation – Possible Errors E_OK Operation GetNetworkHandle Comment Returns the network handle (ComMChannel) of the bus identified by the given network type and network ID. Mapped to API Mirror_GetNetworkHandle Variation – networkType Type Mirror_NetworkType Direction IN Comment Network type of the bus to be identified. Variation – networkId Type uint8 Direction IN Comment Network ID of the bus to be identified. Variation – network Type NetworkHandleType Direction OUT Comment ComM channel that corresponds to the bus identified by the given network type and network ID. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation GetNetworkId Comment Returns the network ID of the given network. Mapped to API Mirror_GetNetworkId Variation – network Type NetworkHandleType Direction IN Comment ComM channel corresponding to one of the buses configured as source or destination bus. Variation – networkId Type uint8 Direction OUT Comment Network ID of the bus identified by 'network'. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation GetNetworkType Comment Returns the network type of the given network. Mapped to API Mirror_GetNetworkType Variation – network Type NetworkHandleType Direction IN Comment ComM channel corresponding to one of the buses configured as source or destination bus. Variation – networkType Type Mirror_NetworkType Direction OUT Comment Network type of the bus identified by 'network'. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation GetStaticFilterState Comment Returns the state of a pre-configured filter. Mapped to API Mirror_GetStaticFilterState Variation – network Type NetworkHandleType Direction IN Comment ComM channel that corresponds to the source bus to which the filter is attached. Variation – filterId Type uint8 Direction IN Comment ID of the filter. Parameters Variation – isActive Type boolean* Direction OUT Comment Pointer to where to store the current filter state. Variation – Possible Errors E_OK E_NOT_OK Operation IsMirrorActive Comment Returns the global mirroring state. Mapped to API Mirror_IsMirrorActive Variation – mirrorActive Type boolean Direction OUT Comment Global mirroring state. Parameters Variation – Possible Errors E_OK Operation IsSourceNetworkStarted Comment Returns the state of a source bus. Mapped to API Mirror_IsSourceNetworkStarted Variation – network Type NetworkHandleType Direction IN Comment ComM channel corresponding to the source bus that shall be checked. Variation – sourceNetworkStarted Type boolean Direction OUT Comment State of a source bus. TRUE: Source bus is active. FALSE: Source bus is inactive. Parameters Variation – Possible Errors E_OK Operation Offline Comment Completely disables any mirroring activities. Source buses are reset to disabled, queued messages are purged, and the destination bus is reset to the default destination. Pre-configured filters are disabled, and filters added at runtime are removed. Mapped to API Mirror_Offline Variation – Possible Errors E_OK Operation RemoveFilter Comment Removes a CAN, LIN, or FlexRay filter that was added at runtime. Mapped to API Mirror_RemoveFilter Variation – network Type NetworkHandleType Direction IN Comment ComM channel that corresponds to the source bus to which the filter is attached. Variation – filterId Type uint8 Direction IN Comment ID of the filter. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation SetStaticFilterState Comment Sets the state of a pre-configured filter. Mapped to API Mirror_SetStaticFilterState Variation – network Type NetworkHandleType Direction IN Comment ComM channel that corresponds to the source bus to which the filter is attached. Variation – filderId Type uint8 Direction IN Comment ID of the filter. Variation – isActive Type boolean Direction IN Comment TRUE: Activate filter FALSE: Deactivate filter Parameters Variation – Possible Errors E_OK E_NOT_OK Operation StartSourceNetwork Comment Activates a source bus. Mapped to API Mirror_StartSourceNetwork Variation – network Type NetworkHandleType Direction IN Comment ComM channel corresponding to the source bus that shall be started. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation StopSourceNetwork Comment Deactivates a source bus. Mapped to API Mirror_StopSourceNetwork Variation – network Type NetworkHandleType Direction IN Comment ComM channel corresponding to the source bus that shall be stopped. Parameters Variation – Possible Errors E_OK E_NOT_OK Operation SwitchDestNetwork Comment Changes the destination bus to the given ComM channel. The previously active destination bus and all source buses are disabled. Mapped to API Mirror_SwitchDestNetwork Variation – network Type NetworkHandleType Direction IN Comment ComM channel corresponding to the destination bus that shall be enabled. Parameters Variation – Possible Errors E_OK E_NOT_OK
requirement SWS_Mirror_01100 [SWS_Mirror_01100] 📄 PDF
Module Header File Imported Type Can_GeneralTypes.h Can_ControllerStateType Can_GeneralTypes.h Can_ErrorStateType Can Can_GeneralTypes.h Can_IdType CanTrcv Can_GeneralTypes.h CanTrcv_TrcvModeType ComStack_Types.h NetworkHandleType ComStack_Types.h PduIdType ComStack_Types.h PduInfoType ComStack_Types ComStack_Types.h PduLengthType Fr_GeneralTypes.h Fr_ChannelType Fr_GeneralTypes.h Fr_ErrorModeType Fr_GeneralTypes.h Fr_POCStateType Fr_GeneralTypes.h Fr_POCStatusType Fr_GeneralTypes.h Fr_SlotModeType Fr Fr_GeneralTypes.h Fr_StartupStateType Module Header File Imported Type Fr_GeneralTypes.h Fr_WakeupStatusType FrIf FrIf.h FrIf_StateType Lin_GeneralTypes.h Lin_FramePidType Lin Lin_GeneralTypes.h Lin_StatusType LinTrcv Lin_GeneralTypes.h LinTrcv_TrcvModeType Rte_StbM_Type.h StbM_SynchronizedTimeBaseType Rte_StbM_Type.h StbM_TimeBaseStatusType Rte_StbM_Type.h StbM_TimeStampType Rte_StbM_Type.h StbM_TimeTupleType Rte_StbM_Type.h StbM_UserDataType StbM StbM.h StbM_VirtualLocalTimeType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType
requirement SWS_Mirror_01101 [SWS_Mirror_01101] 📄 PDF
PduR_MirrorTransmit PduR_Mirror.h Requests transmission of a PDU.
requirement SWS_Mirror_01102 [SWS_Mirror_01102] 📄 PDF
CanIf_EnableBusMirroring CanIf.h Enables or disables mirroring for a CAN controller. CanIf_GetControllerErrorState CanIf.h This service calls the corresponding CAN Driver service for obtaining the error state of the CAN controller. CanIf_GetControllerMode CanIf.h This service calls the corresponding CAN Driver service for obtaining the current status of the CAN controller. CanIf_GetControllerTxErrorCounter CanIf.h This service calls the corresponding CAN Driver service for obtaining the Tx error counter of the CAN controller. CanIf_GetTrcvMode CanIf.h This function invokes CanTrcv_GetOpMode and updates the parameter TransceiverModePtr with the value OpMode provided by CanTrcv. Det_ReportError Det.h Service to report development errors. FrIf_EnableBusMirroring FrIf.h Enables or disables mirroring for all FlexRay controllers connected to the addressed FlexRay cluster. FrIf_GetPOCStatus FrIf.h Wraps the FlexRay Driver API function Fr_Get POCStatus(). FrIf_GetState FrIf.h Get current FrIf state. LinIf_EnableBusMirroring LinIf.h Enables or disables mirroring for a LIN channel. LinIf_GetTrcvMode LinIf.h Returns the actual state of a LIN Transceiver Driver. StbM_GetCurrentTime StbM.h Returns a time value (Local Time Base derived from Global Time Base) in standard format. Note: This API shall be called with locked interrupts / within an Exclusive Area to prevent interruption (i.e., the risk that the time stamp is outdated on return of the function call).
requirement SWS_Mirror_CONSTR_00001 [SWS_Mirror_CONSTR_00001] 📄 PDF
The MirrorDestPdu of a MirrorDestNetwork- Can requires a MetaDataItem of MetaDataItemType CAN_ID_32 . The CanI- fTxPduCanIdMask of the corresponding CanIfTxPduCfg shall be 0 .
requirement SWS_Mirror_CONSTR_00002 [SWS_Mirror_CONSTR_00002] 📄 PDF
The CanFdPaddingValue that is used to transmit the PDU referenced by MirrorDestPduRef for a CAN-FD destination bus shall be set to 0 to ensure that the NetworkStateAvailable of a CAN status item is 0 if the status item has not been written by the Bus Mirroring module but lies in a padded region of the status frame.
requirement SWS_Mirror_CONSTR_00003 [SWS_Mirror_CONSTR_00003] 📄 PDF
The configured MirrorSourceFlexRayFilter s shall be configured such that they do not include serialized frames transmitted on the source bus.
requirement SWS_Mirror_CONSTR_00004 [SWS_Mirror_CONSTR_00004] 📄 PDF
FrIfAllowDynamicLSduLength shall be set to true for all FrIfFrameStructure s that contain FrIfTxPdu s referenced by a Mir- rorDestPdu of a MirrorDestNetworkFlexRay .
requirement SWS_Mirror_NA [SWS_Mirror_NA] 📄 PDF
{DRAFT} These requirements are not applicable to this specifica- tion.
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Mirror- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Mirror@rel:R20-11#7f3c65bf- Content hash
7f3c65bf- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_BusMirroring.pdf#nameddest=SWS_Mirror_01003