xref: /utopia/UTPA2-700.0.x/mxlib/include/apiHSL.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 //<MStar Software>
2 //******************************************************************************
3 // MStar Software
4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5 // All software, firmware and related documentation herein ("MStar Software") are
6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7 // law, including, but not limited to, copyright law and international treaties.
8 // Any use, modification, reproduction, retransmission, or republication of all
9 // or part of MStar Software is expressly prohibited, unless prior written
10 // permission has been granted by MStar.
11 //
12 // By accessing, browsing and/or using MStar Software, you acknowledge that you
13 // have read, understood, and agree, to be bound by below terms ("Terms") and to
14 // comply with all applicable laws and regulations:
15 //
16 // 1. MStar shall retain any and all right, ownership and interest to MStar
17 //    Software and any modification/derivatives thereof.
18 //    No right, ownership, or interest to MStar Software and any
19 //    modification/derivatives thereof is transferred to you under Terms.
20 //
21 // 2. You understand that MStar Software might include, incorporate or be
22 //    supplied together with third party`s software and the use of MStar
23 //    Software may require additional licenses from third parties.
24 //    Therefore, you hereby agree it is your sole responsibility to separately
25 //    obtain any and all third party right and license necessary for your use of
26 //    such third party`s software.
27 //
28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29 //    MStar`s confidential information and you agree to keep MStar`s
30 //    confidential information in strictest confidence and not disclose to any
31 //    third party.
32 //
33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34 //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35 //    without limitation, any warranties of merchantability, non-infringement of
36 //    intellectual property rights, fitness for a particular purpose, error free
37 //    and in conformity with any international standard.  You agree to waive any
38 //    claim against MStar for any loss, damage, cost or expense that you may
39 //    incur related to your use of MStar Software.
40 //    In no event shall MStar be liable for any direct, indirect, incidental or
41 //    consequential damages, including without limitation, lost of profit or
42 //    revenues, lost or damage of data, and unauthorized system use.
43 //    You agree that this Section 4 shall still apply without being affected
44 //    even if MStar Software has been modified by MStar in accordance with your
45 //    request or instruction for your use, except otherwise agreed by both
46 //    parties in writing.
47 //
48 // 5. If requested, MStar may from time to time provide technical supports or
49 //    services in relation with MStar Software to you for your use of
50 //    MStar Software in conjunction with your or your customer`s product
51 //    ("Services").
52 //    You understand and agree that, except otherwise agreed by both parties in
53 //    writing, Services are provided on an "AS IS" basis and the warranty
54 //    disclaimer set forth in Section 4 above shall apply.
55 //
56 // 6. Nothing contained herein shall be construed as by implication, estoppels
57 //    or otherwise:
58 //    (a) conferring any license or right to use MStar name, trademark, service
59 //        mark, symbol or any other identification;
60 //    (b) obligating MStar or any of its affiliates to furnish any person,
61 //        including without limitation, you and your customers, any assistance
62 //        of any kind whatsoever, or any information; or
63 //    (c) conferring any license or right under any intellectual property right.
64 //
65 // 7. These terms shall be governed by and construed in accordance with the laws
66 //    of Taiwan, R.O.C., excluding its conflict of law rules.
67 //    Any and all dispute arising out hereof or related hereto shall be finally
68 //    settled by arbitration referred to the Chinese Arbitration Association,
69 //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70 //    Rules of the Association by three (3) arbitrators appointed in accordance
71 //    with the said Rules.
72 //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73 //    be English.
74 //    The arbitration award shall be final and binding to both parties.
75 //
76 //******************************************************************************
77 //<MStar Software>
78 /**************************************************************************
79  * Copyright (c) 2008 MStar Semiconductor, Inc. All Rights Reserved.
80  **************************************************************************/
81 /** \file
82  * \brief This is the low-level drivers header file for the FrHsl module.
83  *
84  */
85 
86 
87 /*!!!!!!!!!!!: MUST include this file after stdio.h because we use our own "printf" definition*/
88 #if defined (MSOS_TYPE_LINUX)
89 #ifndef FRHSL_H
90 #define FRHSL_H
91 
92 /*******************************************************************************
93 ** Includes
94 *******************************************************************************/
95 
96 #include "MsTypes.h"
97 
98 #ifdef  __cplusplus
99 extern "C" {
100 #endif
101 
102 #define HSL_TCPIP                   true
103 
104 
105 // max. number of ID
106 #define HSL_GROUP_MAX               1024    // group id
107 #define HSL_LOG_ID_MAX              1024    // log id
108 #define DEFAULT_GROUP               HSL_DBG_SN_ALL_DEBUG  // To support default group filtering inserted by silox.exe when none are specified.
109 
110 // Group ID for all modules
111 // utopia
112 #define HSL_DBG_UTOPIA_ALL_DEBUG    (GROUP_MODULE_UTOPIA_ALL<<2 | GROUP_LEVEL_DEBUG)
113 #define HSL_DBG_UTOPIA_ALL_INFO     (GROUP_MODULE_UTOPIA_ALL<<2 | GROUP_LEVEL_INFO)
114 #define HSL_DBG_UTOPIA_GOP_DEBUG    (GROUP_MODULE_UTOPIA_GOP<<2 | GROUP_LEVEL_DEBUG)
115 #define HSL_DBG_UTOPIA_GOP_INFO     (GROUP_MODULE_UTOPIA_GOP<<2 | GROUP_LEVEL_INFO)
116 #define HSL_DBG_UTOPIA_GE_DEBUG     (GROUP_MODULE_UTOPIA_GE<<2 | GROUP_LEVEL_DEBUG)
117 #define HSL_DBG_UTOPIA_GE_INFO      (GROUP_MODULE_UTOPIA_GE<<2 | GROUP_LEVEL_INFO)
118 #define HSL_DBG_UTOPIA_HSL_DEBUG     (GROUP_MODULE_UTOPIA_HSL<<2 | GROUP_LEVEL_DEBUG)
119 //�K
120 
121 // middleware
122 #define HSL_DBG_MW_ALL_DEBUG        (GROUP_MODULE_MW_ALL<<2 | GROUP_LEVEL_DEBUG)
123 #define HSL_DBG_MW_ALL_INFO         (GROUP_MODULE_MW_ALL<<2 | GROUP_LEVEL_INFO)
124 #define HSL_DBG_MW_PGS_DEBUG        (GROUP_MODULE_MW_PGS<<2 | GROUP_LEVEL_DEBUG)
125 #define HSL_DBG_MW_PGS_INFO         (GROUP_MODULE_MW_PGS<<2 | GROUP_LEVEL_INFO)
126 #define HSL_DBG_MW_MHEG5_DEBUG      (GROUP_MODULE_MW_MHEG5<<2 | GROUP_LEVEL_DEBUG)
127 #define HSL_DBG_MW_MHEG5_INFO       (GROUP_MODULE_MW_MHEG5<<2 | GROUP_LEVEL_INFO)
128 //�K
129 
130 // supernova
131 #define HSL_DBG_SN_ALL_DEBUG        (GROUP_MODULE_SN_ALL<<2 | GROUP_LEVEL_DEBUG)
132 #define HSL_DBG_SN_ALL_INFO         (GROUP_MODULE_SN_ALL<<2 | GROUP_LEVEL_INFO)
133 #define HSL_DBG_SN_MUF_DEBUG        (GROUP_MODULE_SN_MUF<<2 | GROUP_LEVEL_DEBUG)
134 #define HSL_DBG_SN_MUF_INFO         (GROUP_MODULE_SN_MUF<<2 | GROUP_LEVEL_INFO)
135 #define HSL_DBG_SN_AUTO_TEST_DEBUG  (GROUP_MODULE_SN_AUTO_TEST<<2 | GROUP_LEVEL_DEBUG)
136 #define HSL_DBG_SN_AUTO_TEST_INFO   (GROUP_MODULE_SN_AUTO_TEST<<2 | GROUP_LEVEL_INFO)
137 
138 #define HSL_DBG_SN_PROFILING        (GROUP_MODULE_SN_ALL<<2 | GROUP_LEVEL_DEBUG)
139 //�K
140 
141 #define HSL_GROUP_ID_MAX            (HSL_DBG_SN_AUTO_TEST_INFO + 1)
142 
143 #define HSL_PROFILING_ADD_MODULE_CONSTRUCTOR(_mODULEnAME) \
144         void __attribute__ ((constructor)) onLoad_ ## _mODULEnAME (void); \
145         \
146         void onLoad_ ## _mODULEnAME (void) \
147         { \
148             Dl_info info; \
149             dladdr((const void*)(&onLoad_ ## _mODULEnAME), &info); \
150             FrHslAddDynamicLibInfo(info.dli_fbase, info.dli_saddr, info.dli_fname); \
151         }
152 
153 // group module ID
154 typedef enum
155 {
156     // utopia scheme                �V 0 ~ 127
157     GROUP_MODULE_UTOPIA_ALL         = 0x00,
158     GROUP_MODULE_UTOPIA_GOP         = 0x01,
159     GROUP_MODULE_UTOPIA_GE          = 0x02,
160     GROUP_MODULE_UTOPIA_HSL         = 0x03,
161 
162     // �K
163 
164     // middleware scheme            �V 128 ~ 191
165     GROUP_MODULE_MW_ALL             = 0x80, // BD subtitle
166     GROUP_MODULE_MW_PGS             = 0x81, // BD subtitle
167     GROUP_MODULE_MW_MHEG5           = 0x82,
168     // �K
169 
170     // SN scheme                    �V 192 ~ 255
171     GROUP_MODULE_SN_ALL             = 0xC0,
172     GROUP_MODULE_SN_MUF             = 0xC1,
173     GROUP_MODULE_SN_AUTO_TEST       = 0xC2,
174     GROUP_MODULE_SN_PROFILE         = 0xC3
175     // �K
176 
177 } EN_HSL_GROUP_MODULE;
178 
179 // group level ID, 2 bits to display the 4 conditions
180 typedef enum
181 {
182     GROUP_LEVEL_DEBUG               = 0x00,
183     GROUP_LEVEL_INFO                = 0x01,
184     GROUP_LEVEL_XXX1                = 0x02,
185     GROUP_LEVEL_XXX2                = 0x03,
186 
187 } EN_HSL_GROUP_LEVEL;
188 
189 // -- communication flow --------------------------->
190 
191 typedef enum
192 {
193     // cmd type
194     HSL_CMD_TYPE                    = 0x10,
195 
196     // cmd group
197     HSL_CMD_CARD_STATUS             = 0x20,
198     HSL_CMD_SEND_DATA               = 0x21,
199     HSL_CMD_RESET                   = 0x22,
200     HSL_CMD_GROUP_ID_FILTER         = 0x23,
201     HSL_CMD_LOG_ID_FILTER           = 0x24,
202     HSL_CMD_ACK_TARGET              = 0x25,
203     HSL_CMD_RB_TOTAL_SIZE           = 0x26,
204     HSL_CMD_RB_EXIST_DATA_SIZE      = 0x27,
205     HSL_CMD_GET_HSL_DATA            = 0x28,
206 
207     // end
208     HSL_CMD_END
209 
210 } EN_HSL_CMD_TYPE;
211 
212 // cmd queue header.
213 typedef struct
214 {
215     MS_U32  u32Pid;     // PC process id
216     MS_U32  u32Len;     // buffer length
217     MS_U16  u16Cmd;     // command
218     MS_U8 *   pu8Buf;    // data buffer
219 }CmdInfo;
220 
221 /** Sets Filter Matrix.
222  * The KiSetsFilterMatrix signal is used to send the signal logging filter
223  * into the system.
224  *
225  * This type of filter is needed when signal sets are
226  * being used. The actual size of this signal when sent may be different
227  * from the compile time structure as the matrix array will change size
228  * depending on the number of signal sets, bases and id's defined in the
229  * system.
230  *
231  * The Sets filter is like an array of 2 dimensional arrays, one for
232  * each signal set. This results in the Sets filter being a 3 dimensional
233  * array (but with variable sized dimensions).
234  *
235  * DO NOT CHANGE THIS STRUCTURE'S NAME OR MEMBERS AS PC TEST TOOLS
236  * MAY REFERENCE THESE. */
237 
238 typedef struct KiSetsFilterMatrixTag
239 {
240     /** The number of signal sets in the matrix array. */
241     MS_U16 numSets;
242 
243     /** The number of signal bases in the matrix array. */
244     MS_U32 numBases;
245 
246     /** The size in bytes of the matrix array. */
247     MS_U32 matrixSize;
248 
249     /** The filter matrix.
250      * The size of this array is given by the matrixSize array rather than
251      * the statically defined dimension. This array has information on what
252      * signals within each set and base should be logged.
253      * The matrix array is split into 3 parts. The first part is an array
254      * from 0 to (numSets - 1) of 4 byte indexes into the base offsets (the
255      * 2nd part), each index represents the first base in the associated set.
256      * The second part is an array from numSets to (numSets + numBases - 1)
257      * of 4 byte indexes into the signal bitmap (the 3rd part), each index
258      * represents the first signal in the associated base. The third part
259      * is the signal bitmap, each bit represents the logging state of a
260      * signal, the signals within a base always start on an MS_U8 boundary
261      * (i.e. there is padding at the end of bases to get to an MS_U8 boundary).*/
262     MS_U8 matrix[10];
263 
264 } KiSetsFilterMatrix;
265 
266 
267 // <-------------------------------------------------
268 
269 
270 /**
271  *  This function is called to initialise the HSL controller.
272  *  This function is called to initialise the HSL controller.
273  */
274 MS_BOOL FrHslInitialise(const MS_PHYADDR PhyAddr, const MS_U32 u32BufByteLen);
275 MS_BOOL FrHslInitialiseMulti(MS_U8 _ICount, MS_U32 *_params);
276 MS_BOOL FrHslDynamicLogPointEnable(const MS_U16 lgHdr);
277 MS_BOOL FrHslDynamicLogPointDisable(const MS_U16 lgHdr);
278 MS_BOOL FrHslDynamicLogPointEnableAll(void);
279 MS_BOOL FrHslDynamicLogPointDisableAll(void);
280 MS_BOOL FrHslDynamicLogGroupEnable(const MS_U16 groupId);
281 MS_BOOL FrHslDynamicLogGroupDisable(const MS_U16 groupId);
282 MS_BOOL FrHslDynamicLogGroupEnableAll(void);
283 MS_BOOL FrHslDynamicLogGroupDisableAll(void);
284 MS_BOOL FrHslV2ApplySingleLogPointFiltering(const MS_U16 lgHdr, const MS_BOOL enableState);
285 MS_BOOL FrHslV2ApplyMultipleLogPointsFilter(const MS_U16* lgHdr_p, const MS_BOOL* enableState_p, const MS_U16 sizeArray);
286 MS_BOOL FrHslV2InitialiseLogPointFiltering(void);
287 MS_BOOL FrHslV2InitialiseGroupIdFiltering(void);
288 MS_BOOL FrHslFinalize(void);
289 void KiTtiProcessSetsFilter(const KiSetsFilterMatrix * signalData);
290 
291 MS_BOOL FrHslAddDynamicLibInfo(void* baseAddress, void* onLoadAddress, const char *libFileName);
292 MS_BOOL FrHslAddThreadInfo(const MS_U32 threadId, const char * threadName);
293 
294 #if 1 // remove these test functions later
295 MS_BOOL FrHslDynamicLogPointTest(const MS_U16 lgHdr);
296 #endif
297 
298 #define M_FrHslWriteSPMsgHeader(value, pu8Buffer, u32Time)  FrHslWriteHeader(HSL_RAWLOB_SP, (MS_U16)value, pu8Buffer, u32Time)
299 
300 #define M_FrHslWriteVLMsgHeader(value, pu8Buffer, u32Time)  FrHslWriteHeader(HSL_RAWLOB_VL, (MS_U16)value, pu8Buffer, u32Time)
301 
302 #define M_FrHslWritePacketCounts(value, pu8Buffer) FrHslWritePayload(FALSE, value, pu8Buffer)
303 
304 #define M_FrHslWritePayload(value, pu8Buffer) FrHslWritePayload(FALSE, value, pu8Buffer)
305 
306 #define M_FrHslWriteLastPayload(value, pu8Buffer) FrHslWritePayload(TRUE, value, pu8Buffer)
307 
308 
309 #define HSL_SPLIT_INT32(a) (a>>16),(a)
310 
311 /*******************************************************************************
312 ** Global Function Prototypes
313 *******************************************************************************/
314 
315 /** Write a 0 argument message to HSL (just a message header, no data).
316   * Write a 0 argument message to HSL (just a message header, no data). Equivalent
317   * Equivalent to former LG_MES_0 macro.
318   * \param MS_U16 hDR = Autogenerated Log point ID.
319   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
320   */
321 void M_FrHslPrintf0(const MS_U32 u32Id, const MS_U16 u16GId, const char* u8Fmt);
322 
323 /** Write a 1 argument message to HSL (just a message header, no data).
324   * Write a 1 argument message to HSL (just a message header, no data).
325   * Equivalent to former LG_MES_1 macro.
326   * \param MS_U16 hDR = Autogenerated Log point ID.
327   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
328   * \param MS_U16 aRG1 = argument value to log
329   */
330 void M_FrHslPrintf1(const MS_U32 u32Id, const MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1);
331 
332 
333 /** Write a 2 argument message to HSL (just a message header, no data).
334   * Write a 2 argument message to HSL (just a message header, no data).
335   * Equivalent to former LG_MES_2 macro.
336   * \param MS_U16 hDR = Autogenerated Log point ID.
337   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
338   * \param MS_U16 aRG1 = first argument value to log
339   * \param MS_U16 aRG2 = second argument value to log
340   */
341 void M_FrHslPrintf2(const MS_U32 u32Id, const MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2);
342 
343 
344 /** Write a 3 argument message to HSL (just a message header, no data).
345   * Write a 3 argument message to HSL (just a message header, no data).
346   * Equivalent to former LG_MES_3 macro.
347   * \param MS_U16 hDR = Autogenerated Log point ID.
348   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
349   * \param MS_U16 aRG1 = first argument value to log
350   * \param MS_U16 aRG2 = second argument value to log
351   * \param MS_U16 aRG3 = third argument value to log
352   */
353 void M_FrHslPrintf3(const MS_U32 u32Id, const MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2,const MS_U16 u16Arg3);
354 
355 
356 /** Write a 4 argument message to HSL (just a message header, no data).
357   * Write a 4 argument message to HSL (just a message header, no data).
358   * Equivalent to former LG_MES_4 macro.
359   * \param MS_U16 hDR = Autogenerated Log point ID.
360   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
361   * \param MS_U16 aRG1 = first argument value to log
362   * \param MS_U16 aRG2 = second argument value to log
363   * \param MS_U16 aRG3 = third argument value to log
364   * \param MS_U16 aRG4 = fourth argument value to log
365   */
366 void M_FrHslPrintf4(const MS_U32 u32Id, const MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4);
367 
368 /** Write a 5 argument message to HSL (just a message header, no data).
369   * Write a 5 argument message to HSL (just a message header, no data).
370   * \param MS_U16 hDR = Autogenerated Log point ID.
371   * Equivalent to former LG_MES_5 macro.
372   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
373   * \param MS_U16 aRG1 = first argument value to log
374   * \param MS_U16 aRG2 = second argument value to log
375   * \param MS_U16 aRG3 = third argument value to log
376   * \param MS_U16 aRG4 = fourth argument value to log
377   * \param MS_U16 aRG5 = fifth argument value to log
378   */
379 void M_FrHslPrintf5(const MS_U32 u32Id, const MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5);
380 
381 /** Write a 6 argument message to HSL (just a message header, no data).
382   * Write a 6 argument message to HSL (just a message header, no data).
383   * \param MS_U16 hDR = Autogenerated Log point ID.
384   * Equivalent to former LG_MES_6 macro.
385   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
386   * \param MS_U16 aRG1 = first argument value to log
387   * \param MS_U16 aRG2 = second argument value to log
388   * \param MS_U16 aRG3 = third argument value to log
389   * \param MS_U16 aRG4 = fourth argument value to log
390   * \param MS_U16 aRG5 = fifth argument value to log
391   * \param MS_U16 aRG6 = sixth argument value to log
392   */
393 void M_FrHslPrintf6(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1 , const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5, const MS_U16 u16Arg6);
394 
395 
396 /** Write a 7 argument message to HSL (just a message header, no data).
397   * Write a 7 argument message to HSL (just a message header, no data).
398   * \param MS_U16 hDR = Autogenerated Log point ID.
399   * Equivalent to former LG_MES_6 macro.
400   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
401   * \param MS_U16 aRG1 = first argument value to log
402   * \param MS_U16 aRG2 = second argument value to log
403   * \param MS_U16 aRG3 = third argument value to log
404   * \param MS_U16 aRG4 = fourth argument value to log
405   * \param MS_U16 aRG5 = fifth argument value to log
406   * \param MS_U16 aRG6 = sixth argument value to log
407   * \param MS_U16 aRG7 = seventh argument value to log
408   */
409 void M_FrHslPrintf7(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
410                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7);
411 
412 
413 /** Write a 8 argument message to HSL (just a message header, no data).
414   * Write a 8 argument message to HSL (just a message header, no data).
415   * \param MS_U16 hDR = Autogenerated Log point ID.
416   * Equivalent to former LG_MES_6 macro.
417   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
418   * \param MS_U16 aRG1 = first argument value to log
419   * \param MS_U16 aRG2 = second argument value to log
420   * \param MS_U16 aRG3 = third argument value to log
421   * \param MS_U16 aRG4 = fourth argument value to log
422   * \param MS_U16 aRG5 = fifth argument value to log
423   * \param MS_U16 aRG6 = sixth argument value to log
424   * \param MS_U16 aRG7 = seventh argument value to log
425   * \param MS_U16 aRG8 = eighth argument value to log
426   */
427 void M_FrHslPrintf8(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
428                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8);
429 
430 
431 /** Write a 9 argument message to HSL (just a message header, no data).
432   * Write a 9 argument message to HSL (just a message header, no data).
433   * \param MS_U16 hDR = Autogenerated Log point ID.
434   * Equivalent to former LG_MES_6 macro.
435   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
436   * \param MS_U16 aRG1 = first argument value to log
437   * \param MS_U16 aRG2 = second argument value to log
438   * \param MS_U16 aRG3 = third argument value to log
439   * \param MS_U16 aRG4 = fourth argument value to log
440   * \param MS_U16 aRG5 = fifth argument value to log
441   * \param MS_U16 aRG6 = sixth argument value to log
442   * \param MS_U16 aRG7 = seventh argument value to log
443   * \param MS_U16 aRG8 = eighth argument value to log
444   * \param MS_U16 aRG9 = nineth argument value to log
445   */
446 void M_FrHslPrintf9(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
447                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8, const MS_U16 u16Arg9);
448 
449 
450 /** Write a 10 argument message to HSL (just a message header, no data).
451   * Write a 10 argument message to HSL (just a message header, no data).
452   * \param MS_U16 hDR = Autogenerated Log point ID.
453   * Equivalent to former LG_MES_6 macro.
454   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
455   * \param MS_U16 aRG1 = first argument value to log
456   * \param MS_U16 aRG2 = second argument value to log
457   * \param MS_U16 aRG3 = third argument value to log
458   * \param MS_U16 aRG4 = fourth argument value to log
459   * \param MS_U16 aRG5 = fifth argument value to log
460   * \param MS_U16 aRG6 = sixth argument value to log
461   * \param MS_U16 aRG7 = seventh argument value to log
462   * \param MS_U16 aRG8 = eighth argument value to log
463   * \param MS_U16 aRG9 = nineth argument value to log
464   * \param MS_U16 aRG10 = tenth argument value to log
465   */
466 void M_FrHslPrintf10(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
467                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8, const MS_U16 u16Arg9, const MS_U16 u16Arg10);
468 
469 
470 /** Write a 11 argument message to HSL (just a message header, no data).
471   * Write a 11 argument message to HSL (just a message header, no data).
472   * \param MS_U16 hDR = Autogenerated Log point ID.
473   * Equivalent to former LG_MES_6 macro.
474   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
475   * \param MS_U16 aRG1 = first argument value to log
476   * \param MS_U16 aRG2 = second argument value to log
477   * \param MS_U16 aRG3 = third argument value to log
478   * \param MS_U16 aRG4 = fourth argument value to log
479   * \param MS_U16 aRG5 = fifth argument value to log
480   * \param MS_U16 aRG6 = sixth argument value to log
481   * \param MS_U16 aRG7 = seventh argument value to log
482   * \param MS_U16 aRG8 = eighth argument value to log
483   * \param MS_U16 aRG9 = nineth argument value to log
484   * \param MS_U16 aRG10 = tenth argument value to log
485   * \param MS_U16 aRG11 = eleventh argument value to log
486   */
487 void M_FrHslPrintf11(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
488                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8, const MS_U16 u16Arg9, const MS_U16 u16Arg10,
489                                     const MS_U16 u16Arg11);
490 
491 
492 /** Write a 12 argument message to HSL (just a message header, no data).
493   * Write a 12 argument message to HSL (just a message header, no data).
494   * \param MS_U16 hDR = Autogenerated Log point ID.
495   * Equivalent to former LG_MES_6 macro.
496   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
497   * \param MS_U16 aRG1 = first argument value to log
498   * \param MS_U16 aRG2 = second argument value to log
499   * \param MS_U16 aRG3 = third argument value to log
500   * \param MS_U16 aRG4 = fourth argument value to log
501   * \param MS_U16 aRG5 = fifth argument value to log
502   * \param MS_U16 aRG6 = sixth argument value to log
503   * \param MS_U16 aRG7 = seventh argument value to log
504   * \param MS_U16 aRG8 = eighth argument value to log
505   * \param MS_U16 aRG9 = nineth argument value to log
506   * \param MS_U16 aRG10 = tenth argument value to log
507   * \param MS_U16 aRG11 = eleventh argument value to log
508   * \param MS_U16 aRG12 = twelveth argument value to log
509   */
510 void M_FrHslPrintf12(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
511                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8, const MS_U16 u16Arg9, const MS_U16 u16Arg10,
512                                     const MS_U16 u16Arg11 , const MS_U16 u16Arg12);
513 
514 
515 /** Write a 13 argument message to HSL (just a message header, no data).
516   * Write a 13 argument message to HSL (just a message header, no data).
517   * \param MS_U16 hDR = Autogenerated Log point ID.
518   * Equivalent to former LG_MES_6 macro.
519   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
520   * \param MS_U16 aRG1 = first argument value to log
521   * \param MS_U16 aRG2 = second argument value to log
522   * \param MS_U16 aRG3 = third argument value to log
523   * \param MS_U16 aRG4 = fourth argument value to log
524   * \param MS_U16 aRG5 = fifth argument value to log
525   * \param MS_U16 aRG6 = sixth argument value to log
526   * \param MS_U16 aRG7 = seventh argument value to log
527   * \param MS_U16 aRG8 = eighth argument value to log
528   * \param MS_U16 aRG9 = nineth argument value to log
529   * \param MS_U16 aRG10 = tenth argument value to log
530   * \param MS_U16 aRG11 = eleventh argument value to log
531   * \param MS_U16 aRG12 = twelveth argument value to log
532   * \param MS_U16 aRG13 = thirteenth argument value to log
533   */
534 void M_FrHslPrintf13(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
535                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8, const MS_U16 u16Arg9, const MS_U16 u16Arg10,
536                                     const MS_U16 u16Arg11 , const MS_U16 u16Arg12, const MS_U16 u16Arg13);
537 
538 
539 /** Write a 14 argument message to HSL (just a message header, no data).
540   * Write a 14 argument message to HSL (just a message header, no data).
541   * \param MS_U16 hDR = Autogenerated Log point ID.
542   * Equivalent to former LG_MES_6 macro.
543   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
544   * \param MS_U16 aRG1 = first argument value to log
545   * \param MS_U16 aRG2 = second argument value to log
546   * \param MS_U16 aRG3 = third argument value to log
547   * \param MS_U16 aRG4 = fourth argument value to log
548   * \param MS_U16 aRG5 = fifth argument value to log
549   * \param MS_U16 aRG6 = sixth argument value to log
550   * \param MS_U16 aRG7 = seventh argument value to log
551   * \param MS_U16 aRG8 = eighth argument value to log
552   * \param MS_U16 aRG9 = nineth argument value to log
553   * \param MS_U16 aRG10 = tenth argument value to log
554   * \param MS_U16 aRG11 = eleventh argument value to log
555   * \param MS_U16 aRG12 = twelveth argument value to log
556   * \param MS_U16 aRG13 = thirteenth argument value to log
557   * \param MS_U16 aRG14 = fourteenth argument value to log
558   */
559 void M_FrHslPrintf14(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
560                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8, const MS_U16 u16Arg9, const MS_U16 u16Arg10,
561                                     const MS_U16 u16Arg11 , const MS_U16 u16Arg12, const MS_U16 u16Arg13, const MS_U16 u16Arg14);
562 
563 
564 /** Write a 15 argument message to HSL (just a message header, no data).
565   * Write a 15 argument message to HSL (just a message header, no data).
566   * \param MS_U16 hDR = Autogenerated Log point ID.
567   * Equivalent to former LG_MES_6 macro.
568   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
569   * \param MS_U16 aRG1 = first argument value to log
570   * \param MS_U16 aRG2 = second argument value to log
571   * \param MS_U16 aRG3 = third argument value to log
572   * \param MS_U16 aRG4 = fourth argument value to log
573   * \param MS_U16 aRG5 = fifth argument value to log
574   * \param MS_U16 aRG6 = sixth argument value to log
575   * \param MS_U16 aRG7 = seventh argument value to log
576   * \param MS_U16 aRG8 = eighth argument value to log
577   * \param MS_U16 aRG9 = nineth argument value to log
578   * \param MS_U16 aRG10 = tenth argument value to log
579   * \param MS_U16 aRG11 = eleventh argument value to log
580   * \param MS_U16 aRG12 = twelveth argument value to log
581   * \param MS_U16 aRG13 = thirteenth argument value to log
582   * \param MS_U16 aRG14 = fourteenth argument value to log
583   * \param MS_U16 aRG15 = fifteenth argument value to log
584   */
585 void M_FrHslPrintf15(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
586                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8, const MS_U16 u16Arg9, const MS_U16 u16Arg10,
587                                     const MS_U16 u16Arg11 , const MS_U16 u16Arg12, const MS_U16 u16Arg13, const MS_U16 u16Arg14, const MS_U16 u16Arg15);
588 
589 
590 /** Write a 16 argument message to HSL (just a message header, no data).
591   * Write a 16 argument message to HSL (just a message header, no data).
592   * \param MS_U16 hDR = Autogenerated Log point ID.
593   * Equivalent to former LG_MES_6 macro.
594   * \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
595   * \param MS_U16 aRG1 = first argument value to log
596   * \param MS_U16 aRG2 = second argument value to log
597   * \param MS_U16 aRG3 = third argument value to log
598   * \param MS_U16 aRG4 = fourth argument value to log
599   * \param MS_U16 aRG5 = fifth argument value to log
600   * \param MS_U16 aRG6 = sixth argument value to log
601   * \param MS_U16 aRG7 = seventh argument value to log
602   * \param MS_U16 aRG8 = eighth argument value to log
603   * \param MS_U16 aRG9 = nineth argument value to log
604   * \param MS_U16 aRG10 = tenth argument value to log
605   * \param MS_U16 aRG11 = eleventh argument value to log
606   * \param MS_U16 aRG12 = twelveth argument value to log
607   * \param MS_U16 aRG13 = thirteenth argument value to log
608   * \param MS_U16 aRG14 = fourteenth argument value to log
609   * \param MS_U16 aRG15 = fifteenth argument value to log
610   * \param MS_U16 aRG16 = sixteenth argument value to log
611   */
612 void M_FrHslPrintf16(MS_U32 u32Id, MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Arg1, const MS_U16 u16Arg2, const MS_U16 u16Arg3, const MS_U16 u16Arg4, const MS_U16 u16Arg5,
613                                     const MS_U16 u16Arg6, const MS_U16 u16Arg7 , const MS_U16 u16Arg8, const MS_U16 u16Arg9, const MS_U16 u16Arg10,
614                                     const MS_U16 u16Arg11 , const MS_U16 u16Arg12, const MS_U16 u16Arg13, const MS_U16 u16Arg14, const MS_U16 u16Arg15, const MS_U16 u16Arg16);
615 
616 
617 /** Write a string message
618  *  Write a string message
619  *  \param MS_U16 hDR = Message header word.
620  *  \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
621  *  \param MS_U16 *pDATA = Array of lENGTH MS_U16s.
622  */
623 void M_FrHslString(const MS_U16 u16Id, const MS_U16 u16GId, const char* u8fmt, const void* pArray);
624 
625 
626 /** Write a message that is an array of MS_U16s.
627  *  Write a message that is an array of MS_U16s. Equivalent to former LG_MS_U16_DATA macro.
628  *  \param MS_U16 hDR = Message header word.
629  *  \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
630  *  \param MS_U16 lENGTH = Number of MS_U16s in the array.
631  *  \param MS_U16 *pDATA = Array of lENGTH MS_U16s.
632  */
633 void M_FrHslArray16(const MS_U16 u16Id, const MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Length, const void* pArray);
634 
635 
636 /**  Write a message that is an array of MS_U32s. Filter applied at run time.
637  *   Write a message that is an array of MS_U32s. Filter applied at run time.
638  *  \param MS_U16 hDR = Message header word.
639  *  \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
640  *  \param MS_U16 lENGTH = Number of MS_U32s in the array.
641  *  \param MS_U32 *pDATA = Array of lENGTH MS_U32s.
642  *  \param MS_U16 lASTwORDeMPTY = Logging indicator for the last 16 bit word - if set to 1 the last 16 bit word is not logged.
643  */
644 void M_FrHslArray32(const MS_U16 u16Id, const MS_U16 u16GId, const char* u8Fmt, const MS_U16 u16Length, const void* pArray, const MS_BOOL bLastWordEmpty);
645 
646 
647 /** Write a message that captures an instance of a structure.
648  *  \param MS_U16 hDR = Message header word.
649  *  \param String fORMATsPECIFER = Format specifier string which resolves to nothing at compile time.
650  *  \param MS_U16 lENGTH = Number of MS_U16s in the array.
651  *  \param MS_U16 *pDATA = Array of lENGTH MS_U16s.
652  */
653 
654 void FrHslTypedefCall(const MS_U16 u16Id, const MS_U16 u16GId, const MS_U16 u16Length, const void* pArray, const MS_BOOL bOddBytePresent);
655 
656 #define M_FrHslTypedef(u16Id, u16GId, u8Fmt, type, pArray)                                                        \
657 {                                                                                                                 \
658    FrHslTypedefCall(u16Id, u16GId, sizeof(type)/sizeof(MS_U16) + sizeof(type)%sizeof(MS_U16), pArray, (MS_BOOL)(sizeof(type)%sizeof(MS_U16)));  \
659 }
660 
661 
662 
663 #ifdef  __cplusplus
664 }
665 #endif
666 
667 #endif
668 #endif
669 /* END OF FILE */
670