KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sdb.h File Reference

Implements search functionality for the self-describing bus. More...

#include "errorcode.h"
#include <stdbool.h>

Go to the source code of this file.

Macros

#define E_SDB_MAGIC   ( E_SDB + 0x01 )
 Magic number incorrect.
 
#define E_SDB_MAGIC_DESCR   "SDB Magic Number"
 

Functions

bool sdbInit ()
 Initializes the self-describing bus. More...
 
void * sdbFindDevice (uint32_t id)
 Finds a device on the bus. More...
 
void sdbDisplay ()
 Dumps the contents of the SDB records to standard out.
 

Detailed Description

Implements search functionality for the self-describing bus.

Definition in file sdb.h.

Function Documentation

void* sdbFindDevice ( uint32_t  id)

Finds a device on the bus.

Parameters
idThe device ID.
Returns
A pointer to the device, or NULL if the device was not found

Definition at line 305 of file sdb.c.

bool sdbInit ( )

Initializes the self-describing bus.

Return values
trueSDB was found
falseSDB does not seem to be present (magic number invalid)

Definition at line 310 of file sdb.c.