MHEG5  18.9.0
MHEG5 Documentation
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"

Go to the source code of this file.

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

Definition in file fpa1_rdf.c.

Macro Definition Documentation

#define CLASS_SHIFT   6

Definition at line 47 of file fpa1_rdf.c.

#define INT_OBJ_CHOICE_COMPS   2

Definition at line 58 of file fpa1_rdf.c.

#define LARGE_TAG_MASK   0x7F

Definition at line 53 of file fpa1_rdf.c.

#define LAST_TAG_OCTET_MASK   0x80

Definition at line 54 of file fpa1_rdf.c.

#define LONG_LENGTH_BASE_SHIFT   8

Definition at line 49 of file fpa1_rdf.c.

#define LONG_LENGTH_MASK   0x7F

Definition at line 56 of file fpa1_rdf.c.

#define LONG_LENGTH_TEST_MASK   0x80

Definition at line 55 of file fpa1_rdf.c.

#define SMALL_TAG_MASK   0x1F

Definition at line 52 of file fpa1_rdf.c.

#define TAG_BASE_SHIFT   7

Definition at line 48 of file fpa1_rdf.c.

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

Definition at line 462 of file fpa1_rdf.c.

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

Definition at line 447 of file fpa1_rdf.c.

int fpa1_rdfGetByteAbsolute ( vpa1_filePos  pos)

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

Parameters
posfile position for read
Returns
int

Definition at line 402 of file fpa1_rdf.c.

vpa1_filePos fpa1_rdfGetContentLength ( void  )
Returns

Definition at line 204 of file fpa1_rdf.c.

vpa1_filePos fpa1_rdfGetCurrentFilePosition ( void  )
Returns

Definition at line 253 of file fpa1_rdf.c.

int fpa1_rdfGetInteger ( vpa1_filePos  intLength)
Returns

Definition at line 277 of file fpa1_rdf.c.

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

Definition at line 418 of file fpa1_rdf.c.

int fpa1_rdfGetNextByte ( void  )
Returns

Definition at line 262 of file fpa1_rdf.c.

vpa1_filePos fpa1_rdfGetNextTagPosn ( void  )
Returns

Definition at line 336 of file fpa1_rdf.c.

int fpa1_rdfGetTag ( void  )
Returns

Definition at line 142 of file fpa1_rdf.c.

void fpa1_rdfMoveToContents ( void  )

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

Returns

Definition at line 319 of file fpa1_rdf.c.

int fpa1_rdfSetNewFilePosition ( vpa1_filePos  newPosition)

To be used only to set tag positions.

Returns

Definition at line 375 of file fpa1_rdf.c.

Variable Documentation

unsigned long fpa1_currentBufferLength = 0

Definition at line 63 of file fpa1_rdf.c.

unsigned long fpa1_currentBufferOffset = 0

Definition at line 64 of file fpa1_rdf.c.

unsigned char* fpa1_currentBufferStart = NULL

Definition at line 62 of file fpa1_rdf.c.

int fpa1_GenericDataCount = 0

Definition at line 66 of file fpa1_rdf.c.

int fpa1_GroupActionCount = 0

Definition at line 67 of file fpa1_rdf.c.

int fpa1_GroupParamCount = 0

Definition at line 68 of file fpa1_rdf.c.

unsigned long fpa1_outputBufferOffset = 0

Definition at line 61 of file fpa1_rdf.c.

unsigned char* fpa1_outputBufferStart = NULL

Definition at line 60 of file fpa1_rdf.c.