gPTP Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
linux_hal_common.hpp File Reference
#include "avbts_osnet.hpp"
#include "avbts_oslock.hpp"
#include "avbts_oscondition.hpp"
#include "avbts_ostimerq.hpp"
#include "avbts_ostimer.hpp"
#include "avbts_osthread.hpp"
#include "avbts_osipc.hpp"
#include "ieee1588.hpp"
#include <list>
Include dependency graph for linux_hal_common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TicketingLock
 
class  LinuxTimestamper
 
class  LinuxNetworkInterface
 
class  LinuxLock
 
class  LinuxLockFactory
 
class  LinuxCondition
 
class  LinuxConditionFactory
 
class  LinuxTimerQueue
 
class  LinuxTimerQueueFactory
 
class  LinuxTimer
 
class  LinuxTimerFactory
 
struct  OSThreadArg
 
class  LinuxThread
 
class  LinuxThreadFactory
 
class  LinuxNetworkInterfaceFactory
 
class  LinuxIPCArg
 
class  LinuxSharedMemoryIPC
 

Macros

#define ONE_WAY_PHY_DELAY   400
 
#define P8021AS_MULTICAST   "\x01\x80\xC2\x00\x00\x0E"
 
#define PTP_DEVICE   "/dev/ptpXX"
 
#define PTP_DEVICE_IDX_OFFS   8
 
#define CLOCKFD   3
 
#define FD_TO_CLOCKID(fd)   ((~(clockid_t) (fd) << 3) | CLOCKFD)
 
#define DEFAULT_GROUPNAME   "ptp"
 

Typedefs

typedef struct
TicketingLockPrivate * 
TicketingLockPrivate_t
 
typedef std::list
< LinuxNetworkInterface * > 
LinuxNetworkInterfaceList
 
typedef LinuxLockPrivate * LinuxLockPrivate_t
 
typedef struct
LinuxConditionPrivate * 
LinuxConditionPrivate_t
 
typedef std::map< int, struct
LinuxTimerQueueActionArg * > 
LinuxTimerQueueMap_t
 
typedef struct
LinuxTimerQueuePrivate * 
LinuxTimerQueuePrivate_t
 
typedef LinuxThreadPrivate * LinuxThreadPrivate_t
 

Functions

Timestamp tsToTimestamp (struct timespec *ts)
 Converts timestamp in the struct timespec format to Timestamp. More...
 
void * LinuxTimerQueueHandler (void *arg)
 Linux timer queue handler. Deals with linux queues. More...
 
void * OSThreadCallback (void *input)
 OSThread callback. More...
 

Macro Definition Documentation

#define CLOCKFD   3

Clock file descriptor

#define DEFAULT_GROUPNAME   "ptp"

Default groupname for the shared memory interface

#define FD_TO_CLOCKID (   fd)    ((~(clockid_t) (fd) << 3) | CLOCKFD)

Converts an FD to CLOCKID

#define ONE_WAY_PHY_DELAY   400

One way phy delay. TX or RX phy delay default value

#define P8021AS_MULTICAST   "\x01\x80\xC2\x00\x00\x0E"

Default multicast address

#define PTP_DEVICE   "/dev/ptpXX"

Default PTP device

#define PTP_DEVICE_IDX_OFFS   8

PTP device index offset

Typedef Documentation

typedef struct LinuxConditionPrivate* LinuxConditionPrivate_t

Provides a private type for the LinuxCondition class

typedef LinuxLockPrivate* LinuxLockPrivate_t

Provides a type for the LinuxLock class

Provides a list of LinuxNetworkInterface members

typedef LinuxThreadPrivate* LinuxThreadPrivate_t

Provides a private type for the LinuxThread class

typedef std::map< int, struct LinuxTimerQueueActionArg *> LinuxTimerQueueMap_t

Provides a map type for the LinuxTimerQueue class

typedef struct LinuxTimerQueuePrivate* LinuxTimerQueuePrivate_t

Provides a private type for the LinuxTimerQueue class

typedef struct TicketingLockPrivate* TicketingLockPrivate_t

Provides the type for the TicketingLock private structure

Function Documentation

void* LinuxTimerQueueHandler ( void *  arg)

Linux timer queue handler. Deals with linux queues.

Parameters
arg[in] LinuxTimerQueue arguments
Returns
void
void* OSThreadCallback ( void *  input)

OSThread callback.

Parameters
inputOSThreadArg structure
Returns
void
Timestamp tsToTimestamp ( struct timespec *  ts)

Converts timestamp in the struct timespec format to Timestamp.

Parameters
tsTimestamp on struct timespec format
Returns
timestamp on the Timestamp format