ASN1C C/C++ Common Runtime  ASN1C v7.3.x
rtBCD.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2019 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
28 #ifndef _RTBCD_H_
29 #define _RTBCD_H_
30 
31 #include "rtsrc/asn1type.h"
32 #include "rtxsrc/rtxTBCD.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
67 EXTERNRT const char* rtBCDToString
68  (OSUINT32 numocts, const OSOCTET* data, char* buffer, size_t bufsiz,
69  OSBOOL isTBCD);
70 
85 EXTERNRT int rtStringToBCD
86  (const char* str, OSOCTET* bcdStr, size_t bufsiz, OSBOOL isTBCD);
87 
101 EXTERNRT int rtStringToDynBCD
102  (OSCTXT* pctxt, const char* str, ASN1DynOctStr* poctstr);
103 
119 EXTERNRT int rtStringToTBCD (const char* str, OSOCTET* bcdStr, size_t bufsiz);
120 
142 EXTERNRT const char* rtTBCDToString
143  (OSUINT32 numocts, const OSOCTET* data, char* buffer, size_t bufsiz);
144 
169 #define rtQ825TBCDToString(numocts, data, buffer, bufsiz) \
170 rtxQ825TBCDToString(numocts, data, buffer, bufsiz)
171 
189 #define rtDecQ825TBCDString(pctxt, numocts, buffer, bufsiz) \
190 rtxDecQ825TBCDString(pctxt, numocts, buffer, bufsiz)
191 
203 #define rtEncQ825TBCDString(pctxt, str) \
204 rtxEncQ825TBCDString(pctxt, str)
205 
214 #define rtTBCDBinToChar(bcdDigit, pdigit) rtxTBCDBinToChar(bcdDigit, pdigit)
215 
225 #define rtTBCDCharToBin(digit, pbyte) rtxTBCDCharToBin(digit, pbyte)
226 
231 #ifdef __cplusplus
232 }
233 #endif
234 
235 #endif
int rtStringToDynBCD(OSCTXT *pctxt, const char *str, ASN1DynOctStr *poctstr)
int rtStringToTBCD(const char *str, OSOCTET *bcdStr, size_t bufsiz)
const char * rtTBCDToString(OSUINT32 numocts, const OSOCTET *data, char *buffer, size_t bufsiz)
const char * rtBCDToString(OSUINT32 numocts, const OSOCTET *data, char *buffer, size_t bufsiz, OSBOOL isTBCD)
Definition: rtxContext.h:185
#define ASN1DynOctStr
Definition: asn1type.h:418
int rtStringToBCD(const char *str, OSOCTET *bcdStr, size_t bufsiz, OSBOOL isTBCD)