SOME/IP Node
/@!Encoding:65001/
includes
{
#include “Somelib.cin”
}
variables
{
UdpSocket sock; // UDP Socket 对象 用于创建和管理 UDP 连接
DWORD peg_testEcu[300]; // 提供的事件组句柄数组
DWORD pev_SREcu[300]; // 提供的事件句柄数组
dword psi_handle[150]; // 提供的服务实例句柄数组
byte EcuEventAdd_index; // 事件添加索引
byte EcuEventGroup_index; // 事件组索引
word EcuServerSessionID; // 服务器会话ID
DWORD csi_eventEcu[150]; // 消费的服务实例句柄数组
DWORD gMcEcu[300]; // global method call handle 全局方法调用
byte EcuMethod_index; // 方法索引
byte EcuCli_method_index; // 客户端方法索引
//定时器
msTimer t_CVC_RTOS1_setReqDrvrWinOper_ECU_Common;
msTimer t_CVC_RTOS1_setReqPassWinOper_ECU_Common;
msTimer t_CVC_RTOS1_setReqRLWinOper_ECU_Common;
msTimer t_CVC_RTOS1_setReqRRWinOper_ECU_Common;
msTimer t_CVC_RTOS1_setreqWinOperRRInput_ECU_Common;
//服务映射结构体
_align(1) struct serviceMappingStructSer {
word serviceID;
byte instanceID;
};
_align(1) struct serviceMappingStructCli {
word serviceID;
byte instanceID;
};
struct serviceMappingStructSer serviceMappingStructSerArray[89];
//CS_RKEMgr
//Event define 事件结构体变量,每个Event 对应一个结构变量和一个长度变量,用来存储时间数据并传递给SOME/IP层
struct RKE_Request v_EcuSer_RKE_Request_Event;
dword l_EcuSer_RKE_Request_Event = 1;
//Event define
struct UserIdent_RKE v_EcuSer_UserIdent_RKE_Event;
dword l_EcuSer_UserIdent_RKE_Event = 1;
//CS_VehicleOutdLockedMgr
//Event define
struct outdDoorLockAuthnSts v_EcuSer_outdDoorLockAuthnSts_Event;
dword l_EcuSer_outdDoorLockAuthnSts_Event = 1;
//Event define
struct vehicleOutdLockedSts v_EcuSer_vehicleOutdLockedSts_Event;
dword l_EcuSer_vehicleOutdLockedSts_Event = 1;
//CS_DoorOpenStsMgr
//Event define
struct DoorOpenSts v_EcuSer_DoorOpenSts_Event;
dword l_EcuSer_DoorOpenSts_Event = 9;
struct DrvrDoorLockFailrEve v_EcuSer_DrvrDoorLockFailrEve_Event;
dword l_EcuSer_DrvrDoorLockFailrEve_Event = 2;
// BS_WiprWashCmd
//Event define
struct FrntWiprCmd v_EcuSer_FrntWiprCmd_Event;
dword l_EcuSer_FrntWiprCmd_Event = 3;
struct ReWiprCmd v_EcuSer_ReWiprCmd_Event;
dword l_EcuSer_ReWiprCmd_Event = 3;
struct WshrCmd v_EcuSer_WshrCmd_Event;
dword l_EcuSer_WshrCmd_Event = 1;
//CS_VehStMgr
//Event define
struct VehNormStEve v_EcuSer_VehNormStEve_Event;
dword l_EcuSer_VehNormStEve_Event = 2;
struct serviceMappingStructCli serviceMappingStructCli1Array[89];
//CS_WinCtrlMgr
//Event define
struct AllWinStsEvent v_Ecu_AllWinStsEvent_Event;
dword l_EcuCli_AllWinStsEvent_Event = 28;
struct DrvrWinMotorSts v_EcuCli_DrvrWinMotorSts_Event;
dword l_EcuCli_DrvrWinMotorSts_Event = 7;
struct DrvrWinRespCodeEve v_EcuCli_DrvrWinRespCodeEve_Event;
dword l_EcuCli_DrvrWinRespCodeEve_Event = 1;
struct PassWinMotorSts v_EcuCli_PassWinMotorSts_Event;
dword l_EcuCli_PassWinMotorSts_Event = 7;
struct PassWinRespCodeEve v_EcuCli_PassWinRespCodeEve_Event;
dword l_EcuCli_PassWinRespCodeEve_Event = 1;
struct RLWinMotorSts v_EcuCli_RLWinMotorSts_Event;
dword l_EcuCli_RLWinMotorSts_Event = 7;
struct RLWinRespCodeEve v_EcuCli_RLWinRespCodeEve_Event;
dword l_EcuCli_RLWinRespCodeEve_Event = 1;
struct RRWinMotorSts v_EcuCli_RRWinMotorSts_Event;
dword l_EcuCli_RRWinMotorSts_Event = 7;
struct RRWinRespCodeEve v_EcuCli_RRWinRespCodeEve_Event;
dword l_EcuCli_RRWinRespCodeEve_Event = 1;
//Method define
struct ReqDrvrWinOper v_EcuCli_ReqDrvrWinOper_Method1;
int ReqDrvrWinOper_Method_Cli; //Menthod 句柄索引
dword l_EcuCli_ReqDrvrWinOper_Method = 2;
struct ReqPassWinOper v_EcuCli_ReqPassWinOper_Method1;
int ReqPassWinOper_Method_Cli;
dword l_EcuCli_ReqPassWinOper_Method = 2;
struct ReqRLWinOper v_EcuCli_ReqRLWinOper_Method1;
int ReqRLWinOper_Method_Cli;
dword l_EcuCli_ReqRLWinOper_Method = 2;
struct ReqRRWinOper v_EcuCli_ReqRRWinOper_Method1;
int ReqRRWinOper_Method_Cli;
dword l_EcuCli_ReqRRWinOper_Method = 2;
struct reqWinOperRRInput v_EcuCli_reqWinOperRRInput_Method1;
int reqWinOperRRInput_Method_Cli;
dword l_EcuCli_reqWinOperRRInput_Method = 4;
struct reqWinOperRROutput v_EcuCli_reqWinOperRROutput_Method1;
int reqWinOperRROutput_Method_Cli;
dword l_EcuCli_reqWinOperRROutput_Method = 1;
//SOME/IP 协议头字段,用于手动构建SOM/IP 协议头,,实现原始SOME/IP 数据包的构建
dword messageId;
word clientId;
word sessionId;
dword requestId ;
byte protocolVersion;
byte interfaceVersion ;
byte messageType; // REQUEST
byte returnCode ;
byte payload[3];
int payloadLen;
dword length ; // SOME/IP 固定格式
// SOME/IP Header: 16 bytes
byte header[16];
int p = 0;
int i;
byte packet[32];
int totalLen;
msTimer timer16; // 50ms
}
// 150ms后
on timer timer16
{
@sysvar::IL_iAuto_ETH::WinRequestEx = 0;
}
on start
{
// 1. 打开 UDP Socket(不指定端口)
sock = UdpSocket::Open( IP_Endpoint(192.168.0.1:30472) );
// 2. 显式绑定本地 IP 与端口(根据你 Python 中的 192.168.0.1:30472)
//udpBind(sock, “192.168.0.1”, 30472);
write(“UDP socket opened & bound to 192.168.0.1:30472”);
}
void sendSomeIpMethod(int methodID, byte A, byte B, byte C)
{
dword serviceId = 0x4071; // 固定
messageId = (serviceId << 16) | methodID;
// 随机 SessionID
clientId = 0x0001;
sessionId = 0x0001;// 随机数
requestId = (clientId << 16) | sessionId;
protocolVersion = 0x01;
interfaceVersion = 0x01;
messageType = 0x00; // REQUEST
returnCode = 0x00;
payload[0] = A;
payload[1] = B;
payload[2] = C;
payloadLen = 3;
length = 8 + payloadLen; // SOME/IP 固定格式
// SOME/IP Header: 16 bytes
p = 0;
// Message ID
header[p++] = (byte)(messageId >> 24);
header[p++] = (byte)(messageId >> 16);
header[p++] = (byte)(messageId >> 8);
header[p++] = (byte)(messageId);
// Length
header[p++] = (byte)(length >> 24);
header[p++] = (byte)(length >> 16);
header[p++] = (byte)(length >> 8);
header[p++] = (byte)(length);
// Request ID
header[p++] = (byte)(requestId >> 24);
header[p++] = (byte)(requestId >> 16);
header[p++] = (byte)(requestId >> 8);
header[p++] = (byte)(requestId);
// ProtocolVersion, InterfaceVersion, MessageType, ReturnCode
header[p++] = protocolVersion;
header[p++] = interfaceVersion;
header[p++] = messageType;
header[p++] = returnCode;
// Build final packet: header + payload
for (i = 0; i < 16; i++)
packet[i] = header[i];
for (i = 0; i < payloadLen; i++)
packet[16 + i] = payload[i];
totalLen = 16 + payloadLen;
// 发送 UDP 到对端(你的 Python 中:192.168.0.101:0x7708)
sock.SendTo(IP_Endpoint(192.168.0.101:30472), packet, totalLen);
write(“SOME/IP MethodCall sent: Method=0x%X A=%d B=%d C=%d”,
methodID, A, B, C);
}
/* ===========================================================
用户手动触发:例如按键 F5 调用 Method 0x0001
=========================================================== */
on key ‘q’
{
// Demo: 对应你 Python 中 A=0x01 B=0x03 C=0x01
sendSomeIpMethod(0x0001, 0x01, 0x14, 0x01);
write(“Triggered: a → sendSomeIpMethod”);
}
on sysvar_update sysvar::IL_iAuto_ETH::Window_Select
{
if(@sysvar::IL_iAuto_ETH::Window_Select == 1)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0001, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select ==2)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0002, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select == 3)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0003, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select ==4)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0004, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx);
setTimer(timer16, 20);
}
}
on sysvar_update sysvar::IL_iAuto_ETH::WinRequestEx
{
if(@sysvar::IL_iAuto_ETH::Window_Select == 1)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0001, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select ==2)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0002, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select == 3)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0003, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select ==4)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0004, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx);
setTimer(timer16, 20);
}
}
on sysvar_update sysvar::IL_iAuto_ETH::WinPositionEx
{
if(@sysvar::IL_iAuto_ETH::Window_Select == 1)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0001, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select ==2)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0002, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select == 3)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0003, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select ==4)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0004, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx);
setTimer(timer16, 20);
}
}
on sysvar_update sysvar::IL_iAuto_ETH::priorityEx
{
if(@sysvar::IL_iAuto_ETH::Window_Select == 1)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0001, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select ==2)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0002, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select == 3)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0003, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx);
setTimer(timer16, 20);
}
else if(@sysvar::IL_iAuto_ETH::Window_Select ==4)
{
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx = @sysvar::IL_iAuto_ETH::priorityEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx = @sysvar::IL_iAuto_ETH::WinPositionEx;
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx = @sysvar::IL_iAuto_ETH::WinRequestEx;
sendSomeIpMethod(0x0004, @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx ,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx,
@sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx);
setTimer(timer16, 20);
}
}
/* ===========================================================
退出时关闭 Socket
=========================================================== */
on preStop
{
sock.Close();
}
//将输入结构体复制到事件变量中
void set_EcuSer_RKE_Request (struct RKE_Request input)
{
memcpy(v_EcuSer_RKE_Request_Event, input);
}
void set_EcuSer_UserIdent_RKE (struct UserIdent_RKE input)
{
memcpy(v_EcuSer_UserIdent_RKE_Event, input);
}
void set_EcuSer_outdDoorLockAuthnSts (struct outdDoorLockAuthnSts input)
{
memcpy(v_EcuSer_outdDoorLockAuthnSts_Event, input);
}
void set_EcuSer_vehicleOutdLockedSts (struct vehicleOutdLockedSts input)
{
memcpy(v_EcuSer_vehicleOutdLockedSts_Event, input);
}
void set_EcuSer_DoorOpenSts (struct DoorOpenSts input)
{
memcpy(v_EcuSer_DoorOpenSts_Event, input);
}
void set_EcuSer_DrvrDoorLockFailrEve (struct DrvrDoorLockFailrEve input)
{
memcpy(v_EcuSer_DrvrDoorLockFailrEve_Event, input);
}
void set_EcuSer_VehNormStEve (struct VehNormStEve input)
{
memcpy(v_EcuSer_VehNormStEve_Event, input);
}
void set_EcuSer_FrntWiprCmd (struct FrntWiprCmd input)
{
memcpy(v_EcuSer_FrntWiprCmd_Event, input);
}
void set_EcuSer_ReWiprCmd (struct ReWiprCmd input)
{
memcpy(v_EcuSer_ReWiprCmd_Event, input);
}
void set_EcuSer_WshrCmd (struct WshrCmd input)
{
memcpy(v_EcuSer_WshrCmd_Event, input);
}
//服务映射函数
void setserviceMappingStructServer() {
serviceMappingStructSerArray[0].serviceID = 16436;
serviceMappingStructSerArray[0].instanceID = 1;
serviceMappingStructSerArray[1].serviceID = 16433;
serviceMappingStructSerArray[1].instanceID = 1;
serviceMappingStructSerArray[2].serviceID = 16434;
serviceMappingStructSerArray[2].instanceID = 1;
serviceMappingStructSerArray[3].serviceID = 28689;
serviceMappingStructSerArray[3].instanceID = 1;
serviceMappingStructSerArray[4].serviceID = 16647;
serviceMappingStructSerArray[4].instanceID = 1;
}
void set_EcuCli_AllWinStsEvent_Event (struct AllWinStsEvent input)
{
memcpy(v_Ecu_AllWinStsEvent_Event, input);
}
void set_EcuCli_DrvrWinMotorSts_Event (struct DrvrWinMotorSts input)
{
memcpy(v_EcuCli_DrvrWinMotorSts_Event, input);
}
void set_EcuCli_DrvrWinRespCodeEve_Event(struct DrvrWinRespCodeEve input)
{
memcpy(v_EcuCli_DrvrWinRespCodeEve_Event, input);
}
void set_EcuCli_PassWinMotorSts_Event (struct PassWinMotorSts input)
{
memcpy(v_EcuCli_PassWinMotorSts_Event, input);
}
void set_EcuCli_PassWinRespCodeEve_Event (struct PassWinRespCodeEve input)
{
memcpy(v_EcuCli_PassWinRespCodeEve_Event, input);
}
void set_EcuCli_RLWinMotorSts_Event (struct RLWinMotorSts input)
{
memcpy(v_EcuCli_RLWinMotorSts_Event, input);
}
void set_EcuCli_RLWinRespCodeEve_Event (struct RLWinRespCodeEve input)
{
memcpy(v_EcuCli_RLWinRespCodeEve_Event, input);
}
void set_EcuCli_RRWinMotorSts_Event (struct RRWinMotorSts input)
{
memcpy(v_EcuCli_RRWinMotorSts_Event, input);
}
void set_EcuCli_RRWinRespCodeEve_Event (struct RRWinRespCodeEve input)
{
memcpy(v_EcuCli_RRWinRespCodeEve_Event, input);
}
void set_EcuCli_ReqDrvrWinOper_Method1 (struct ReqDrvrWinOper input)
{
memcpy(v_EcuCli_ReqDrvrWinOper_Method1, input);
}
void set_EcuCli_ReqPassWinOper_Method1 (struct ReqPassWinOper input)
{
memcpy(v_EcuCli_ReqPassWinOper_Method1, input);
}
void set_EcuCli_ReqRLWinOper_Method1(struct ReqRLWinOper input)
{
memcpy(v_EcuCli_ReqRLWinOper_Method1, input);
}
void set_EcuCli_ReqRRWinOper_Method1 (struct ReqRRWinOper input)
{
memcpy(v_EcuCli_ReqRRWinOper_Method1, input);
}
void set_EcuCli_reqWinOperRRInput_Method1 (struct reqWinOperRRInput input)
{
memcpy(v_EcuCli_reqWinOperRRInput_Method1, input);
}
void set_EcuCli_reqWinOperRROutput_Method1 (struct reqWinOperRROutput input)
{
memcpy(v_EcuCli_reqWinOperRROutput_Method1, input);
}
void serviceMappingStructCli() {
serviceMappingStructCli1Array[0].serviceID = 16497;
serviceMappingStructCli1Array[0].instanceID = 2;
}
//client_CS_WinCtrlMgr_start 初始化客户端服务消费
void client_CS_WinCtrlMg_start()
{
dword SD_port=30490;
dword gMulticastIP;
dword aep_eventEcu;
dword cev_eventEcu;
dword ceg_eventEcu;
char gMulticastIPStr[16] = “239.0.0.253”;
dword instanceid=2;
dword serviceid=16497;
dword majorVersion=1;
dword minorVersion=1;
long result;
ipSetAdapterMacId(1,ethGetMacAddressAsNumber(“00:9A:CD:00:10:01”)); //cvc_cp 设置网络适配器MAC 地址
setBusContext(GetBusNameContext(“EthernetCluster”)); //设置总线
gMulticastIP=ipGetAddressAsNumber(gMulticastIPStr); //
aep_eventEcu = AREthOpenLocalApplicationEndpoint(IP_Endpoint(UDP:192.168.0.1:30472)); //创建应用端节点AEP
csi_eventEcu[0] = AREthCreateConsumedServiceInstance(aep_eventEcu,serviceid,instanceid,majorVersion,minorVersion);//创建消费数据实例CSI
ceg_eventEcu = AREthAddConsumedEventGroup(csi_eventEcu[0],1); //创建事件组
AREthSetProperty(“SDMulticastIp” , gMulticastIP); //设置SD属性
AREthSetProperty(“SDMulticastPort” ,SD_port); //设置SD属性
//create event AllWinStsEvent
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32769,“CallbackEvent_AllWinStsEvent”);//创建事件消费者, 32769 服务ID Callback 回调函数
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32770,“CallbackEvent_DrvrWinMotorSts”);
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32771,“CallbackEvent_DrvrWinRespCodeEve”);
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32772,“CallbackEvent_PassWinMotorSts”);
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32773,“CallbackEvent_PassWinRespCodeEve”);
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32774,“CallbackEvent_RLWinMotorSts”);
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32775,“CallbackEvent_RLWinRespCodeEve”);
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32776,“CallbackEvent_RRWinMotorSts”);
cev_eventEcu = AREthCreateEventConsumer(csi_eventEcu[0],32777,“CallbackEvent_RRWinRespCodeEve”);
// create method 创建方法调用句柄
gMcEcu[EcuCli_method_index] = AREthCreateMethodCall(csi_eventEcu[0], 1);
ReqDrvrWinOper_Method_Cli = EcuCli_method_index;
EcuCli_method_index++;
// create method
gMcEcu[EcuCli_method_index] = AREthCreateMethodCall(csi_eventEcu[0], 2);
ReqPassWinOper_Method_Cli = EcuCli_method_index;
EcuCli_method_index++;
// create method
gMcEcu[EcuCli_method_index] = AREthCreateMethodCall(csi_eventEcu[0], 3);
ReqRLWinOper_Method_Cli = EcuCli_method_index;
EcuCli_method_index++;
// create method
gMcEcu[EcuCli_method_index] = AREthCreateMethodCall(csi_eventEcu[0], 4);
ReqRRWinOper_Method_Cli = EcuCli_method_index;
EcuCli_method_index++;
// create method
gMcEcu[EcuCli_method_index] = AREthCreateMethodCall(csi_eventEcu[0], 5);
reqWinOperRRInput_Method_Cli = EcuCli_method_index;
EcuCli_method_index++;
}
// create method
void send_ReqDrvrWinOper_CVC_RTOS1()
{
// set the two input parameters of the method
AREthSetData(gMcEcu[ReqDrvrWinOper_Method_Cli],l_EcuCli_ReqDrvrWinOper_Method,v_EcuCli_ReqDrvrWinOper_Method1);
AREthCallMethod(gMcEcu[ReqDrvrWinOper_Method_Cli]);
}
// create method
void send_ReqPassWinOper_CVC_RTOS1()
{
// set the two input parameters of the method
AREthSetData(gMcEcu[ReqPassWinOper_Method_Cli],l_EcuCli_ReqPassWinOper_Method,v_EcuCli_ReqPassWinOper_Method1);
AREthCallMethod(gMcEcu[ReqPassWinOper_Method_Cli]);
}
// create method
void send_ReqRLWinOper_CVC_RTOS1()
{
// set the two input parameters of the method
AREthSetData(gMcEcu[ReqRLWinOper_Method_Cli],l_EcuCli_ReqRLWinOper_Method,v_EcuCli_ReqRLWinOper_Method1);
AREthCallMethod(gMcEcu[ReqRLWinOper_Method_Cli]);
}
// create method
void send_ReqRRWinOper_CVC_RTOS1()
{
// set the two input parameters of the method
AREthSetData(gMcEcu[ReqRRWinOper_Method_Cli],l_EcuCli_ReqRRWinOper_Method,v_EcuCli_ReqRRWinOper_Method1);
AREthCallMethod(gMcEcu[ReqRRWinOper_Method_Cli]);
}
// create method
void send_reqWinOperRRInput_CVC_RTOS1()
{
// set the two input parameters of the method
AREthSetData(gMcEcu[reqWinOperRRInput_Method_Cli],l_EcuCli_reqWinOperRRInput_Method,v_EcuCli_reqWinOperRRInput_Method1);
AREthCallMethod(gMcEcu[reqWinOperRRInput_Method_Cli]);
}
void CallbackEvent_AllWinStsEvent(DWORD cevHandle, DWORD messageHandle)
{}
void CallbackEvent_DrvrWinMotorSts(DWORD cevHandle, DWORD messageHandle)
{}
void CallbackEvent_DrvrWinRespCodeEve(DWORD cevHandle, DWORD messageHandle)
{}
void CallbackEvent_PassWinMotorSts(DWORD cevHandle, DWORD messageHandle)
{}
void CallbackEvent_PassWinRespCodeEve(DWORD cevHandle, DWORD messageHandle)
{}
void CallbackEvent_RLWinMotorSts(DWORD cevHandle, DWORD messageHandle)
{}
void CallbackEvent_RLWinRespCodeEve(DWORD cevHandle, DWORD messageHandle)
{}
void CallbackEvent_RRWinMotorSts(DWORD cevHandle, DWORD messageHandle)
{}
void CallbackEvent_RRWinRespCodeEve(DWORD cevHandle, DWORD messageHandle)
{}
//ReqDrvrWinOper
on timer t_CVC_RTOS1_setReqDrvrWinOper_ECU_Common
{
struct ReqDrvrWinOper data;
if (@sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::CONTROLS::send_ReqDrvrWinOper== 1)
{
data.priorityEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.priorityEx;
data.WinRequestEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinRequestEx;
data.WinPositionEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqDrvrWinOper.WinPositionEx;
set_EcuCli_ReqDrvrWinOper_Method1(data);
send_ReqDrvrWinOper_CVC_RTOS1();
}
setTimer(t_CVC_RTOS1_setReqDrvrWinOper_ECU_Common, 10);
}
//ReqPassWinOper
on timer t_CVC_RTOS1_setReqPassWinOper_ECU_Common
{
struct ReqPassWinOper data;
if (@sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::CONTROLS::send_ReqPassWinOper== 1)
{
data.priorityEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.priorityEx;
data.WinRequestEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinRequestEx;
data.WinPositionEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqPassWinOper.WinPositionEx;
set_EcuCli_ReqPassWinOper_Method1(data);
send_ReqPassWinOper_CVC_RTOS1();
}
setTimer(t_CVC_RTOS1_setReqPassWinOper_ECU_Common, 10);
}
//ReqRLWinOper
on timer t_CVC_RTOS1_setReqRLWinOper_ECU_Common
{
struct ReqRLWinOper data;
if (@sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::CONTROLS::send_ReqRLWinOper== 1)
{
data.priorityEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.priorityEx;
data.WinRequestEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinRequestEx;
data.WinPositionEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRLWinOper.WinPositionEx;
set_EcuCli_ReqRLWinOper_Method1(data);
send_ReqRLWinOper_CVC_RTOS1();
}
setTimer(t_CVC_RTOS1_setReqRLWinOper_ECU_Common, 10);
}
//ReqRRWinOper
on timer t_CVC_RTOS1_setReqRRWinOper_ECU_Common
{
struct ReqRRWinOper data;
if (@sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::CONTROLS::send_ReqRRWinOper== 1)
{
data.priorityEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.priorityEx;
data.WinRequestEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinRequestEx;
data.WinPositionEx = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::ReqRRWinOper.WinPositionEx;
set_EcuCli_ReqRRWinOper_Method1(data);
send_ReqRRWinOper_CVC_RTOS1();
}
setTimer(t_CVC_RTOS1_setReqRRWinOper_ECU_Common, 10);
}
//reqWinOperRR
on timer t_CVC_RTOS1_setreqWinOperRRInput_ECU_Common
{
struct reqWinOperRRInput data;
if (@sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::CONTROLS::send_reqWinOperRR== 1)
{
data.WinCtrlPriority = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::reqWinOperRRInput.WinCtrlPriority;
data.WinControl = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::reqWinOperRRInput.WinControl;
data.WinRequest = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::reqWinOperRRInput.WinRequest;
data.WinPosition = @sysvarMember::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::METHODS::reqWinOperRRInput.WinPosition;
set_EcuCli_reqWinOperRRInput_Method1(data);
send_reqWinOperRRInput_CVC_RTOS1();
}
setTimer(t_CVC_RTOS1_setreqWinOperRRInput_ECU_Common, 10);
}
//start the server service send_CS_WinCtrlMg_Enable_16497_1
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::CONSUMED_SERVICES::sif_16497_2::CONTROLS::CS_WinCtrlMgr_Enable
{
if (@this == 1)
{
client_CS_WinCtrlMg_start();/the generation capl lib/
}
else
{
SomeipReleaseConsumedService(16497, 2);
}
}
//start the server service CS_RKEMgr
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16436_1::CONTROLS::CS_RKEMgr_Enable
{
if (@this == 1)
{
Server_CS_RKEMgr_start();/the generation capl lib/
}
else
{
SomeipReleaseConsumedService(16436, 1);
}
}
//初始化服务端服务提供
void Server_CS_RKEMgr_start()
{
DWORD SD_port=30490;
DWORD serverid=16436;
DWORD instanceid=1;
dword majorVersion=1;
dword minorVersion=1;
dword aep;
ipSetAdapterMacId(1,ethGetMacAddressAsNumber(“00:9A:CD:00:10:01”));
setBusContext(GetBusNameContext(“EthernetCluster”));
aep = AREthOpenLocalApplicationEndpoint(17, 34034 ,ipGetAddressAsNumber(“192.168.0.1”));
psi_handle[0] = AREthCreateProvidedServiceInstance(aep,serverid,instanceid,majorVersion,minorVersion); //创建提供的服务实例PSI
AREthSetProperty(“SDMulticastIp”, ipGetAddressAsNumber(“239.0.0.253”));
peg_testEcu[EcuEventGroup_index + 1] = AREthAddProvidedEventGroup(psi_handle[0], 1); //创建提供的事件组
//create event
pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[0],32769,"OnPrepareEvent_RKE_Request_CVC_RTOS1");//添加事件
AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
AREthSetProperty(pev_SREcu[EcuEventAdd_index],"CycleTimeMs",100.0); //设置事件属性
EcuEventAdd_index++;
//create event
pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[0],32770,"OnPrepareEvent_UserIdent_RKE_CVC_RTOS1");
AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
AREthSetProperty(pev_SREcu[EcuEventAdd_index],"CycleTimeMs",100.0);
EcuEventAdd_index++;
EcuEventAdd_index++;
}
// 事件准备函数
void OnPrepareEvent_RKE_Request_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_RKE_Request_Event,v_EcuSer_RKE_Request_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16436_1::EVENTGROUPS::evg::EVENTS::RKE_Request
{
struct RKE_Request data;
data.RKE_Request = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16436_1::EVENTGROUPS::evg::EVENTS::RKE_Request.RKE_Request;
set_EcuSer_RKE_Request(data);
}
void OnPrepareEvent_UserIdent_RKE_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_UserIdent_RKE_Event,v_EcuSer_UserIdent_RKE_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16436_1::EVENTGROUPS::evg::EVENTS::UserIdent_RKE
{
struct UserIdent_RKE data;
data.UserIdent_RKE = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16436_1::EVENTGROUPS::evg::EVENTS::UserIdent_RKE.UserIdent_RKE;
set_EcuSer_UserIdent_RKE(data);
}
//start the server service CS_VehicleOutdLockedMgr
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16433_1::CONTROLS::CS_VehicleOutdLockedMgr_Enable
{
if (@this == 1)
{
Server_CS_VehicleOutdLockedMgr_start();/*the generation capl lib*/
}
else
{
SomeipReleaseConsumedService(16433, 1);
}
}
void Server_CS_VehicleOutdLockedMgr_start()
{
DWORD SD_port=30490;
DWORD serverid=16433;
DWORD instanceid=1;
dword majorVersion=1;
dword minorVersion=1;
dword aep;
ipSetAdapterMacId(1,ethGetMacAddressAsNumber(“00:9A:CD:00:10:01”));
setBusContext(GetBusNameContext(“EthernetCluster”));
aep = AREthOpenLocalApplicationEndpoint(17, 34031 ,ipGetAddressAsNumber(“192.168.0.1”));
psi_handle[1] = AREthCreateProvidedServiceInstance(aep,serverid,instanceid,majorVersion,minorVersion);
AREthSetProperty(“SDMulticastIp”, ipGetAddressAsNumber(“239.0.0.253”));
peg_testEcu[EcuEventGroup_index + 1] = AREthAddProvidedEventGroup(psi_handle[1], 1);
//create event
pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[1],32769,"OnPrepareEvent_outdDoorLockAuthnSts_CVC_RTOS1");
AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
AREthSetProperty(pev_SREcu[EcuEventAdd_index],"CycleTimeMs",100.0);
EcuEventAdd_index++;
//create event
pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[1],32770,"OnPrepareEvent_vehicleOutdLockedSts_CVC_RTOS1");
AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
AREthSetProperty(pev_SREcu[EcuEventAdd_index],"CycleTimeMs",100.0);
EcuEventAdd_index++;
EcuEventAdd_index++;
}
void OnPrepareEvent_outdDoorLockAuthnSts_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_outdDoorLockAuthnSts_Event,v_EcuSer_outdDoorLockAuthnSts_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16433_1::EVENTGROUPS::evg::EVENTS::outdDoorLockAuthnSts
{
struct outdDoorLockAuthnSts data;
data.outdDoorLockAuthnSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16433_1::EVENTGROUPS::evg::EVENTS::outdDoorLockAuthnSts.outdDoorLockAuthnSts;
set_EcuSer_outdDoorLockAuthnSts(data);
}
void OnPrepareEvent_vehicleOutdLockedSts_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_vehicleOutdLockedSts_Event,v_EcuSer_vehicleOutdLockedSts_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16433_1::EVENTGROUPS::evg::EVENTS::vehicleOutdLockedSts
{
struct vehicleOutdLockedSts data;
data.vehicleOutdLockedSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16433_1::EVENTGROUPS::evg::EVENTS::vehicleOutdLockedSts.vehicleOutdLockedSts;
set_EcuSer_vehicleOutdLockedSts(data);
}
//start the server service CS_DoorOpenStsMgr
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::CONTROLS::CS_DoorOpenStsMgr_Enable
{
if (@this == 1)
{
Server_CS_DoorOpenStsMgr_start();/*the generation capl lib*/
}
else
{
SomeipReleaseConsumedService(16434, 1);
}
}
void Server_CS_DoorOpenStsMgr_start()
{
DWORD SD_port=30490;
DWORD serverid=16434;
DWORD instanceid=1;
dword majorVersion=1;
dword minorVersion=1;
dword aep;
ipSetAdapterMacId(1,ethGetMacAddressAsNumber(“00:9A:CD:00:10:01”));
setBusContext(GetBusNameContext(“EthernetCluster”));
aep = AREthOpenLocalApplicationEndpoint(17, 34032 ,ipGetAddressAsNumber(“192.168.0.1”));
psi_handle[2] = AREthCreateProvidedServiceInstance(aep,serverid,instanceid,majorVersion,minorVersion);
AREthSetProperty(“SDMulticastIp”, ipGetAddressAsNumber(“239.0.0.253”));
peg_testEcu[EcuEventGroup_index + 1] = AREthAddProvidedEventGroup(psi_handle[2], 1);
//create event
pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[2],32769,"OnPrepareEvent_DoorOpenSts_CVC_RTOS1");
AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
AREthSetProperty(pev_SREcu[EcuEventAdd_index],"CycleTimeMs",100.0);
EcuEventAdd_index++;
//create event
pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[2],32770,"OnPrepareEvent_DrvrDoorLockFailrEve_CVC_RTOS1");
AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
AREthSetProperty(pev_SREcu[EcuEventAdd_index],"CycleTimeMs",100.0);
EcuEventAdd_index++;
EcuEventAdd_index++;
}
void OnPrepareEvent_DoorOpenSts_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_DoorOpenSts_Event,v_EcuSer_DoorOpenSts_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts
{
struct DoorOpenSts data;
data.BackDoorTrDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.BackDoorTrDoorSts;
data.DrvrDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.DrvrDoorSts;
data.GlassHatchDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.GlassHatchDoorSts;
data.GlobalDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.GlobalDoorSts;
data.PassDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.PassDoorSts;
data.ReDrvrSideDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.ReDrvrSideDoorSts;
data.ReLeDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.ReLeDoorSts;
data.RePassSideDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.RePassSideDoorSts;
data.ReRiDoorSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DoorOpenSts.ReRiDoorSts;
set_EcuSer_DoorOpenSts(data);
}
void OnPrepareEvent_DrvrDoorLockFailrEve_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_outdDoorLockAuthnSts_Event,v_EcuSer_outdDoorLockAuthnSts_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DrvrDoorLockFailrEve
{
struct DrvrDoorLockFailrEve data;
data.drvrDoorStatusSupposedFailr = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DrvrDoorLockFailrEve.drvrDoorStatusSupposedFailr;
data.DrvrDoorSensFailCount = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16434_1::EVENTGROUPS::evg::EVENTS::DrvrDoorLockFailrEve.DrvrDoorSensFailCount;
set_EcuSer_DrvrDoorLockFailrEve(data);
}
//start the server service CS_VehStMgr
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_28689_1::CONTROLS::CS_VehStMgr_Enable
{
if (@this == 1)
{
Server_CS_VehStMgr_start();/*the generation capl lib*/
}
else
{
SomeipReleaseConsumedService(28689, 1);
}
}
void Server_CS_VehStMgr_start()
{
DWORD SD_port=30490;
DWORD serverid=28689;
DWORD instanceid=1;
dword majorVersion=1;
dword minorVersion=1;
dword aep;
ipSetAdapterMacId(1,ethGetMacAddressAsNumber(“00:9A:CD:00:10:01”));
setBusContext(GetBusNameContext(“EthernetCluster”));
aep = AREthOpenLocalApplicationEndpoint(17, 37011 ,ipGetAddressAsNumber(“192.168.0.1”));
psi_handle[3] = AREthCreateProvidedServiceInstance(aep,serverid,instanceid,majorVersion,minorVersion);
AREthSetProperty(“SDMulticastIp”, ipGetAddressAsNumber(“239.0.0.253”));
peg_testEcu[EcuEventGroup_index + 1] = AREthAddProvidedEventGroup(psi_handle[3], 1);
//create event
pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[3],32769,"OnPrepareEvent_VehNormStEve_CVC_RTOS1");
AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
AREthSetProperty(pev_SREcu[EcuEventAdd_index],"CycleTimeMs",100.0);
EcuEventAdd_index++;
EcuEventAdd_index++;
}
void OnPrepareEvent_VehNormStEve_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_VehNormStEve_Event,v_EcuSer_VehNormStEve_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_28689_1::EVENTGROUPS::evg::EVENTS::VehNormStEve
{
struct VehNormStEve data;
data.vehLifeCycleState= @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_28689_1::EVENTGROUPS::evg::EVENTS::VehNormStEve.vehLifeCycleState;
// write(” %x”,data.vehLifeCycleState);
data.vehState = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_28689_1::EVENTGROUPS::evg::EVENTS::VehNormStEve.vehState;
set_EcuSer_VehNormStEve(data);
}
//start the server service BS_WiprWashCmd
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::CONTROLS::BS_WiprWashCmd_Enable
{
if (@this == 1)
{
Server_BS_WiprWashCmd_start();/*the generation capl lib*/
}
else
{
SomeipReleaseConsumedService(16647, 1);
}
}
void Server_BS_WiprWashCmd_start()
{
DWORD SD_port=30490;
DWORD serverid=16647;
DWORD instanceid=1;
dword majorVersion=1;
dword minorVersion=1;
dword aep;
ipSetAdapterMacId(1,ethGetMacAddressAsNumber(“00:9A:CD:00:10:01”));
setBusContext(GetBusNameContext(“EthernetCluster”));
aep = AREthOpenLocalApplicationEndpoint(17, 34107 ,ipGetAddressAsNumber(“192.168.0.1”));
psi_handle[4] = AREthCreateProvidedServiceInstance(aep,serverid,instanceid,majorVersion,minorVersion);
AREthSetProperty(“SDMulticastIp”, ipGetAddressAsNumber(“239.0.0.253”));
peg_testEcu[EcuEventGroup_index + 1] = AREthAddProvidedEventGroup(psi_handle[4], 1);
//create event
// pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[4],32769,“OnPrepareEvent_FrntWiprCmd_CVC_RTOS1”);
// AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
// AREthSetProperty(pev_SREcu[EcuEventAdd_index],“CycleTimeMs”,10.0);
// EcuEventAdd_index++;
//create event
pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[4],32770,"OnPrepareEvent_ReWiprCmd_CVC_RTOS1");
AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
AREthSetProperty(pev_SREcu[EcuEventAdd_index],"CycleTimeMs",100.0);
EcuEventAdd_index++;
//create event
// pev_SREcu[EcuEventAdd_index] = AREthAddEvent(psi_handle[4],32771,“OnPrepareEvent_WshrCmd_CVC_RTOS1”);
// AREthAddEventToEventgroup(peg_testEcu[EcuEventGroup_index + 1], pev_SREcu[EcuEventAdd_index]);
// AREthSetProperty(pev_SREcu[EcuEventAdd_index],“CycleTimeMs”,10.0);
// EcuEventAdd_index++;
EcuEventAdd_index++;
}
void OnPrepareEvent_FrntWiprCmd_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_FrntWiprCmd_Event,v_EcuSer_FrntWiprCmd_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::FrntWiprCmd
{
struct FrntWiprCmd data;
data.frntCswFailrSts= @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::FrntWiprCmd.frntCswFailrSts;
data.frntCswIntPosn = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::FrntWiprCmd.frntCswIntPosn;
data.frntWiprSwtSts = @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::FrntWiprCmd.frntWiprSwtSts;
set_EcuSer_FrntWiprCmd(data);
}
void OnPrepareEvent_ReWiprCmd_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_ReWiprCmd_Event,v_EcuSer_ReWiprCmd_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::ReWiprCmd
{
struct ReWiprCmd data;
data.reCswFailrSts= @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::ReWiprCmd.reCswFailrSts;
data.reCswIntPosn= @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::ReWiprCmd.reCswIntPosn;
data.reWiprSwtSts= @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::ReWiprCmd.reWiprSwtSts;
set_EcuSer_ReWiprCmd(data);
}
void OnPrepareEvent_WshrCmd_CVC_RTOS1(DWORD eventHandle, DWORD messageHandle)
{
AREthSetData(messageHandle,l_EcuSer_WshrCmd_Event,v_EcuSer_WshrCmd_Event);
EcuServerSessionID++;
}
on sysvar_change sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::WshrCmd
{
struct WshrCmd data;
data.WshrSwtSts= @sysvar::IL_iAuto_ETH::NODES::N_ECU_Common::PROVIDED_SERVICES::sif_16647_1::EVENTGROUPS::evg::EVENTS::WshrCmd.WshrSwtSts;
set_EcuSer_WshrCmd(data);
}
void SomeipReleaseConsumedService(word serviceID, byte instanceID)
{
byte i;
for(i=0; i<elCount(serviceMappingStructSerArray);i++)
{
if(serviceMappingStructSerArray[i].serviceID == serviceID && serviceMappingStructSerArray[i].instanceID == instanceID){
AREthReleaseConsumedServiceInstance(csi_eventEcu[i]);
break;
}
}
}
