/*
*
*/
/*
*
*/
#ifdef CFG_ENABLE_ADBG_LOADER
/* Command / ( / ) */
case COMMAND(FALSE, , ):
{
Status = ();
}
break;
/* Response to / ( / ) */
case COMMAND(TRUE, , ):
{
Status = ( PL_GRSize, ResponseStatus, );
}
break;
#endif
/* $Copyright$ */
/* NOTE: This is an automatically generated file. DO NOT EDIT! */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "t_command_protocol.h"
#include "r_debug.h"
#include "r_communication_service.h"
#include "custom_commands.h"
#include "custom_command_ids.h"
#include "custom_commands_impl.h"
#include "error_codes.h"
#include "r_serialization.h"
#include "r_command_protocol.h"
#define CUSTOMCOMMAND(response, group, id) (((response) << 31) | ((group) << 16) | (id))
#define CUSTOMCOMMANDDATA(TypeP,ApplicationP,CommandP,SessionP,SizeP) \
memset((uint8*)&CmdData, 0x00, sizeof(CommandData_t)); \
CmdData.Type = TypeP; \
CmdData.ApplicationNr = ApplicationP; \
CmdData.CommandNr = CommandP; \
CmdData.SessionNr = SessionP; \
CmdData.Payload.Size = sizeof(ErrorCode_e)+SizeP; \
CmdData.Payload.Data_p = NULL; \
if(SizeP !=0)\
{\
CmdData.Payload.Data_p = (uint8 *)malloc(sizeof(ErrorCode_e)+SizeP); \
if(NULL == CmdData.Payload.Data_p) \
{ \
A_(printf("command_marshal.c (%d): ** memory allocation failed! **\n",__LINE__);) \
return E_ALLOCATE_FAILED; \
}\
}
#define CUSTOMCOMMANDDATAOUT(TypeP,ApplicationP,CommandP,SizeP) \
memset((uint8*)&CmdData, 0x00, sizeof(CommandData_t)); \
CmdData.Type = TypeP; \
CmdData.ApplicationNr = ApplicationP; \
CmdData.CommandNr = CommandP; \
CmdData.SessionNr = 0; \
CmdData.Payload.Size = SizeP; \
CmdData.Payload.Data_p = NULL; \
if(SizeP !=0)\
{\
CmdData.Payload.Data_p = (uint8 *)malloc( SizeP); \
if(NULL == CmdData.Payload.Data_p) \
{ \
A_(printf("command_marshal.c (%d): ** memory allocation failed! **\n",__LINE__);) \
return E_ALLOCATE_FAILED; \
}\
}
//static uint16 Session;
ErrorCode_e Do_CustomCEH_Call(CommandData_t * CmdData_p)
{
ErrorCode_e Status = E_GENERAL_FATAL_ERROR;
// uint32 PL_GRSize = 0;
// ErrorCode_e ResponseStatus = E_SUCCESS;
boolean response = FALSE;
void *Data_p = CmdData_p->Payload.Data_p;
(void)(Data_p); //XVSZOAN Temporary solution!
if (CmdData_p->Type == GENERAL_RESPONSE_PACKAGE)
{
response = TRUE;
// PL_GRSize = CmdData_p->Payload.Size;
// ResponseStatus = (ErrorCode_e)get_uint16(&Data_p);
}
// Session = CmdData_p->SessionNr;
switch(CUSTOMCOMMAND(response, CmdData_p->ApplicationNr, CmdData_p->CommandNr))
{
default:
break;
}
return Status;
}
ErrorCode_e (uint32 PLSize, )
{
CommandData_t CmdData;
void *Data_p;
CUSTOMCOMMANDDATAOUT(COMMAND, , , PLSize);
Data_p = CmdData.Payload.Data_p;
return Do_R15_Command_Send(GlobalCommunication_p, &CmdData);
}
ErrorCode_e (uint32 PLSize, ErrorCode_e Status, )
{
CommandData_t CmdData;
void *Data_p;
CUSTOMCOMMANDDATA( GENERAL_RESPONSE, , , Session, PLSize);
Data_p = CmdData.Payload.Data_p;
put_uint32(&Data_p, Status);
return Do_R15_Command_Send(GlobalCommunication_p, &CmdData);
}