DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
stbdbram.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 // pre-processor mechanism so multiple inclusions don't cause compilation error
26 
27 #ifndef _STBDBRAM_H
28 
29 #define _STBDBRAM_H
30 
31 #include "techtype.h"
32 #include "dba_nvm.h"
33 
34 //---Constant and macro definitions for public use-----------------------------
35 
36 //---Enumerations for public use-----------------------------------------------
37 
38 //---Global type defs for public use-------------------------------------------
39 
40 //---Global Function prototypes for public use---------------------------------
41 
42 void STB_InitRAMAccess(void);
43 void STB_PurgeRAMRecords(void);
44 
45 void* STB_CreateRAMRecord(U8BIT rec_id, U16BIT size, U16BIT nvm_block, void *parent);
46 void STB_DestroyRAMRecord(void *rec_ptr);
47 
48 U8BIT STB_GetRAMRecordId(void *rec_ptr);
49 U16BIT STB_GetRAMRecordNVMBlock(void *rec_ptr);
50 U16BIT STB_GetRAMRecordPrevNVMBlock(void *rec_ptr);
51 U16BIT STB_GetRAMRecordNextNVMBlock(void *rec_ptr);
52 void* STB_GetRAMRecordParent(void *rec_ptr);
53 void STB_SetRAMRecordParent(void *rec_ptr, void *parent);
54 
55 void STB_MoveRAMRecordBefore(void *rec_ptr, void *dst_ptr);
56 void STB_MoveRAMRecordAfter(void *rec_ptr, void *dst_ptr);
57 
58 void* STB_FindRAMRecordFromId(U8BIT rec_id, void *parent, void *last_rec);
59 void* STB_FindRAMRecordFromNVMBlock(U16BIT nvm_block);
60 
61 void STB_SetRAMRecordString(void *rec_ptr, U16BIT offset, U16BIT size, U8BIT *string);
62 void STB_SetRAMRecordNumber(void *rec_ptr, U16BIT offset, U16BIT size, U32BIT value);
63 void STB_SetRAMRecordPointer(void *rec_ptr, U16BIT offset, void* ptr);
64 
65 U8BIT* STB_GetRAMRecordString(void *rec_ptr, U16BIT offset, U16BIT size);
66 U32BIT STB_GetRAMRecordNumber(void *rec_ptr, U16BIT offset, U16BIT size);
67 void* STB_GetRAMRecordPointer(void *rec_ptr, U16BIT offset);
68 
69 #endif // _STBDBRAM_H
70 
71 //*****************************************************************************
72 // End of file
73 //*****************************************************************************
74 
U8BIT STB_GetRAMRecordId(void *rec_ptr)
Returns record type id for given record pointer.
Definition: stbdbram.c:223
NVM database access defines, structures and functions.
void STB_MoveRAMRecordAfter(void *rec_ptr, void *dst_ptr)
Moves RAM record after the specified record in the RAM linked list.
Definition: stbdbram.c:418
void * STB_CreateRAMRecord(U8BIT rec_id, U16BIT size, U16BIT nvm_block, void *parent)
Creates a record of the type given in RAM (mallocs block).
Definition: stbdbram.c:156
void STB_SetRAMRecordNumber(void *rec_ptr, U16BIT offset, U16BIT size, U32BIT value)
Writes the specified value into a field of a RAM record.
Definition: stbdbram.c:587
U16BIT STB_GetRAMRecordPrevNVMBlock(void *rec_ptr)
Returns NVM block number for previous record of given pointer.
Definition: stbdbram.c:275
void STB_SetRAMRecordPointer(void *rec_ptr, U16BIT offset, void *ptr)
Writes the specified value into a field of a RAM record.
Definition: stbdbram.c:624
void * STB_GetRAMRecordPointer(void *rec_ptr, U16BIT offset)
Reads the specified value of a field from a RAM record.
Definition: stbdbram.c:731
void * STB_GetRAMRecordParent(void *rec_ptr)
Returns parent pointer for given record pointer.
Definition: stbdbram.c:343
void STB_PurgeRAMRecords(void)
Initialises RAM database by destroying all records and linked lists.
Definition: stbdbram.c:111
void STB_SetRAMRecordParent(void *rec_ptr, void *parent)
Sets parent pointer for given record pointer.
Definition: stbdbram.c:370
void STB_InitRAMAccess(void)
Initialises parameters needed for RAM record access.
Definition: stbdbram.c:79
void STB_DestroyRAMRecord(void *rec_ptr)
Destroys record given in RAM (frees block).
Definition: stbdbram.c:197
U8BIT * STB_GetRAMRecordString(void *rec_ptr, U16BIT offset, U16BIT size)
Reads the specified value of a field from a RAM record.
Definition: stbdbram.c:661
U32BIT STB_GetRAMRecordNumber(void *rec_ptr, U16BIT offset, U16BIT size)
Reads the specified value of a field from a RAM record.
Definition: stbdbram.c:691
void STB_MoveRAMRecordBefore(void *rec_ptr, void *dst_ptr)
Moves RAM record before the specified record in the RAM linked list.
Definition: stbdbram.c:393
void * STB_FindRAMRecordFromId(U8BIT rec_id, void *parent, void *last_rec)
Returns pointer to RAM structure for the given record type. Finds the next record in the list after t...
Definition: stbdbram.c:445
U16BIT STB_GetRAMRecordNVMBlock(void *rec_ptr)
Returns NVM block number for given record pointer.
Definition: stbdbram.c:249
void STB_SetRAMRecordString(void *rec_ptr, U16BIT offset, U16BIT size, U8BIT *string)
Writes the specified string into a field of a RAM record.
Definition: stbdbram.c:552
System Wide Global Technical Data Type Definitions.
void * STB_FindRAMRecordFromNVMBlock(U16BIT nvm_block)
Returns pointer to RAM structure which relates to the given NVM record block no.
Definition: stbdbram.c:510
U16BIT STB_GetRAMRecordNextNVMBlock(void *rec_ptr)
Returns NVM block number for next record of given pointer.
Definition: stbdbram.c:309