Kvaser CANLIB: Time Domain Handling
Data Structures | Typedefs | Functions

Time Domain Handling

Data Structures

struct  kvTimeDomainData_s

Typedefs

typedef struct kvTimeDomainData_s kvTimeDomainData

Functions

kvStatus kvTimeDomainCreate (kvTimeDomain *domain)
kvStatus kvTimeDomainDelete (kvTimeDomain domain)
kvStatus kvTimeDomainResetTime (kvTimeDomain domain)
kvStatus kvTimeDomainGetData (kvTimeDomain domain, kvTimeDomainData *data, size_t bufsiz)
kvStatus kvTimeDomainAddHandle (kvTimeDomain domain, const int hnd)
kvStatus kvTimeDomainRemoveHandle (kvTimeDomain domain, const int hnd)

Typedef Documentation

Used for time domain handling.


Function Documentation

kvStatus kvTimeDomainAddHandle ( kvTimeDomain  domain,
const int  hnd 
)
C#
static Canlib.canStatus kvTimeDomainAddHandle(object domain, int handle);
Delphi
function kvTimeDomainAddHandle(domain: kvTimeDomain; handle: canHandle): kvStatus;

This routine adds an open channel handle to a domain.

Note:
A time domain is a set of channels with a common time base.
Parameters:
[in]domainAn opaque variable set by kvTimeDomainCreate() that identifies the domain to add a handle to.
[in]hndA handle to an open channel.
Returns:
canOK (zero) if success
canERR_xxx (negative) if failure
See also:
Code Examples
kvTimeDomainCreate(), kvTimeDomainRemoveHandle()
Examples:
kvTimeStampTester.c.
kvStatus kvTimeDomainCreate ( kvTimeDomain domain)
C#
static Canlib.canStatus kvTimeDomainCreate(out object domain);
Delphi
function kvTimeDomainCreate(var domain: kvTimeDomain): kvStatus;

This routine creates an empty time domain.

The variable is set by this function and then used in later calls to other functions using a kvTimeDomain.

Time domains created by kvTimeDomainCreate() can be destroyed with a call to kvTimeDomainDelete().

Note:
A time domain is a set of channels with a common time base.
Parameters:
[out]domainA pointer to a caller allocated, opaque variable of type kvTimeDomain that holds data to identify a particlar time domain.
Returns:
canOK (zero) if success
canERR_xxx (negative) if failure
See also:
Code Examples
kvTimeDomainDelete()
Examples:
kvTimeStampTester.c.
kvStatus kvTimeDomainDelete ( kvTimeDomain  domain)
C#
static Canlib.canStatus kvTimeDomainDelete(object domain);
Delphi
function kvTimeDomainDelete(domain: kvTimeDomain): kvStatus;

This is a cleanup routine that deletes all members of a domain and then deletes the domain itself.

Note:
A time domain is a set of channels with a common time base.
Parameters:
[in]domainAn opaque variable set by kvTimeDomainCreate() that identifies the domain to be deleted.
Returns:
canOK (zero) if success
canERR_xxx (negative) if failure
See also:
Code Examples
kvTimeDomainCreate()
Examples:
kvTimeStampTester.c.
kvStatus kvTimeDomainGetData ( kvTimeDomain  domain,
kvTimeDomainData data,
size_t  bufsiz 
)
C#
static Canlib.canStatus kvTimeDomainGetData(object domain, Canlib.kvTimeDomainData data);
Delphi
function kvTimeDomainGetData(domain: kvTimeDomain; var data: kvTimeDomainData; bufsiz: Cardinal): kvStatus;

This routine collects some data on a time domain.

Note:
A time domain is a set of channels with a common time base.
Parameters:
[in]domainAn opaque variable set by kvTimeDomainCreate() that identifies the domain to add a handle to.
[out]dataA pointer to a kvTimeDomainData that is to be filled by the function.
[in]bufsizThe size in bytes of the kvTimeDomainData struct.
Returns:
canOK (zero) if success
canERR_xxx (negative) if failure
See also:
Code Examples
kvTimeDomainCreate()
Examples:
kvTimeStampTester.c.
kvStatus kvTimeDomainRemoveHandle ( kvTimeDomain  domain,
const int  hnd 
)
C#
static Canlib.canStatus kvTimeDomainRemoveHandle(object domain, int handle);
Delphi
function kvTimeDomainRemoveHandle(domain: kvTimeDomain; handle: canHandle): kvStatus;

This routine removes an open channel handle from a domain.

Note:
A time domain is a set of channels with a common time base.
Parameters:
[in]domainAn opaque variable set by kvTimeDomainCreate() that identifies the domain to remove a handle from.
[in]hndA handle to an open channel.
Returns:
canOK (zero) if success
canERR_xxx (negative) if failure
See also:
kvTimeDomainCreate(), kvTimeDomainAddHandle()
kvStatus kvTimeDomainResetTime ( kvTimeDomain  domain)
C#
static Canlib.canStatus kvTimeDomainResetTime(object domain);
Delphi
function kvTimeDomainResetTime(domain: kvTimeDomain): kvStatus;

This routine resets the time on all members of a time domain.

After a call to this routine timestamps from all channels with MagiSync™ running have no offset at all any longer. The same applies for channels that reside on the same physical interface.

Note:
A time domain is a set of channels with a common time base.
Parameters:
[in]domainAn opaque variable set by kvTimeDomainCreate() that identifies the domain to reset the time on.
Returns:
canOK (zero) if success
canERR_xxx (negative) if failure
See also:
Code Examples
kvTimeDomainCreate()
Examples:
kvTimeStampTester.c.