summaryrefslogtreecommitdiff
path: root/lcmodule/source/cnh1606344_ldr_communication_module/config/ces_commands_c.xsl
blob: 4ab37c41f666a3e203d05b3d76945b068fee21b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright (C) ST-Ericsson SA 2011
* License terms: 3-clause BSD license
-->
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">

<import href="common.xsl"/>

<output method="text" indent="no"/>
<strip-space elements="*"/>
<param name="target" />
<param name="supportedCommands" />
<variable name="supported_commands" select="document($supportedCommands)/commandspec"/>

<template match="command">
<variable name="group" select="../@number" />
<variable name="command" select="@number" />
<if test='$target="lcm" or $supported_commands/group[@number=$group]/command[@number=$command]'>
<if test='contains(@supportedcmdtype, "longrunning")'> 
<text>  </text>{
<text>   </text>NULL,
<text>   </text><value-of select="../interface/@name"/>_<value-of select="interface/@name"/>Repeat,
<text>   </text><call-template name="commandid"/>,
<text>   </text>1
<text>  </text>},
</if>
</if>
</template>

<template match="group" mode="CommandsList">
<variable name="group" select="@number" />
<if test='$target="lcm" or $supported_commands/group[@number=$group]'>
<if test='contains(@supportedcmdtype, "longrunning")'>
CommandInformation_t Generic<value-of select="interface/@name"/>GroupCommandsList[]=
{
<apply-templates select="command" />
  {
   NULL,
   <value-of select="interface/@name"/>_ErrorHandlerRepeat,
   COMMAND_ERRORHANDLER,
   1
  },
  /* ADD MORE COMMANDS */
  /*stop block. it can not be removed*/
  {
   NULL,
   NULL,
   0xFF,
   1
  }
};
</if>
</if>
</template>

<template match="group" mode="ActiveApplications">
<variable name="group" select="@number" />
<if test='$target="lcm" or $supported_commands/group[@number=$group]'>
<if test='contains(@supportedcmdtype, "longrunning")'>
<text>  </text>{
<text>    </text><call-template name="groupid" />,
<text>    </text>0,
<text>    </text>Generic<value-of select="interface/@name"/>GroupCommandsList
<text>  </text>},
</if>
</if>
</template>

<template match="/commandspec">
/*******************************************************************************
 * $Copyright ST-Ericsson 2010 $
 ******************************************************************************/
/**
 *  @addtogroup ldr_communication_module
 *  @{
 */

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;

#include &quot;ces_commands.h&quot;
#include &quot;t_command_exec_service.h&quot;
#include &quot;command_ids.h&quot;
#include &quot;command_execution_control.h&quot;

/*******************************************************************************
 * File scope types, constants and variables
 ******************************************************************************/
/*
 *  Commands that need command execution service
 */
<apply-templates select="group" mode="CommandsList" />

ApplicationInfo_t ActiveApplications[]=
{
<apply-templates select="group" mode="ActiveApplications" />
/* ADD MORE APPLICATIONS HERE */
};

/*******************************************************************************
 * Definition of external functions
 ******************************************************************************/
uint32 Get_ApplicationInfoSize(void)
{
  return sizeof(ApplicationInfo_t);
}

uint32 Get_ActiveApplicationsSize(void)
{
  return sizeof(ActiveApplications);
}

/*@}*/
</template>


</stylesheet>