MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Macros | Functions | Variables
fpa1_rdf.c File Reference

Contains functions to read MHEG-5 ASN.1 scripts. More...

#include <stdio.h>
#include <stdlib.h>
#include "vpa1_rdf.h"
#include "vpa1_sys.h"
#include "vpa1_tgs.h"
#include "fpa1_cho.h"
#include "fpa1_rdf.h"
#include "fpa1_syn.h"
#include "pa1_mem.h"
#include "fpa1_BlockAlloc.h"
#include "glue_debug.h"

Macros

#define CLASS_SHIFT   6
 
#define TAG_BASE_SHIFT   7
 
#define LONG_LENGTH_BASE_SHIFT   8
 
#define SMALL_TAG_MASK   0x1F
 
#define LARGE_TAG_MASK   0x7F
 
#define LAST_TAG_OCTET_MASK   0x80
 
#define LONG_LENGTH_TEST_MASK   0x80
 
#define LONG_LENGTH_MASK   0x7F
 
#define INT_OBJ_CHOICE_COMPS   2
 

Functions

int fpa1_rdfGetTag (void)
 
vpa1_filePos fpa1_rdfGetContentLength (void)
 
vpa1_filePos fpa1_rdfGetCurrentFilePosition (void)
 
int fpa1_rdfGetNextByte (void)
 
int fpa1_rdfGetInteger (vpa1_filePos intLength)
 
void fpa1_rdfMoveToContents (void)
 
vpa1_filePos fpa1_rdfGetNextTagPosn (void)
 
int fpa1_rdfSetNewFilePosition (vpa1_filePos newPosition)
 
int fpa1_rdfGetByteAbsolute (vpa1_filePos pos)
 
int fpa1_rdfGetIntegerAbsolute (vpa1_filePos pos, int intLength)
 
int fpa1_rdfGetBooleanAbsolute (vpa1_filePos pos)
 
fpa1_syntaxListfpa1_parseScriptASN (unsigned char *asndata, unsigned long len)
 Top level entry point to the ASN.1 script to fpa1_syntaxList converter. This function takes the original ASN.1 script as a character array and returns a pointer to a syntax list representing the contents of the ASN.1 script. More...
 

Variables

unsigned char * fpa1_outputBufferStart = NULL
 
unsigned long fpa1_outputBufferOffset = 0
 
unsigned char * fpa1_currentBufferStart = NULL
 
unsigned long fpa1_currentBufferLength = 0
 
unsigned long fpa1_currentBufferOffset = 0
 
int fpa1_GenericDataCount = 0
 
int fpa1_GroupActionCount = 0
 
int fpa1_GroupParamCount = 0
 

Detailed Description

Contains functions to read MHEG-5 ASN.1 scripts.

Date
01/02/2002
Author
R.Freeman

Function Documentation

fpa1_syntaxList* fpa1_parseScriptASN ( unsigned char *  asndata,
unsigned long  len 
)

Top level entry point to the ASN.1 script to fpa1_syntaxList converter. This function takes the original ASN.1 script as a character array and returns a pointer to a syntax list representing the contents of the ASN.1 script.

Parameters
asndataASN.1 script (as character array)
lenLength of asn.1 script.
Returns
*fpa1_syntaxList
int fpa1_rdfGetBooleanAbsolute ( vpa1_filePos  pos)

Gets a boolean from the current ASN.1 file buffer. Does no range checking.

Parameters
posfile position for read
Returns
int
int fpa1_rdfGetByteAbsolute ( vpa1_filePos  pos)

Gets a byte from the current ASN.1 file buffer.

Parameters
posfile position for read
Returns
int
vpa1_filePos fpa1_rdfGetContentLength ( void  )
Returns
vpa1_filePos fpa1_rdfGetCurrentFilePosition ( void  )
Returns
int fpa1_rdfGetInteger ( vpa1_filePos  intLength)
Returns
int fpa1_rdfGetIntegerAbsolute ( vpa1_filePos  pos,
int  intLength 
)

Gets an integer (in hex format) from the current ASN.1 file buffer.

Parameters
posfile position for read.
tLengthin Number of bytes representing the integer (between 1 and 4)
Returns
int
int fpa1_rdfGetNextByte ( void  )
Returns
vpa1_filePos fpa1_rdfGetNextTagPosn ( void  )
Returns
int fpa1_rdfGetTag ( void  )
Returns
void fpa1_rdfMoveToContents ( void  )

strPtr must point to an array of length + 1 (to allow for teh NULL char).

Returns
int fpa1_rdfSetNewFilePosition ( vpa1_filePos  newPosition)

To be used only to set tag positions.

Returns