OMAPI  1.8
Open Movement Public API
Date/time type

Macros

#define OM_DATETIME_FROM_YMDHMS(year, month, day, hours, minutes, seconds)
 
#define OM_DATETIME_YEAR(dateTime)
 
#define OM_DATETIME_MONTH(dateTime)
 
#define OM_DATETIME_DAY(dateTime)
 
#define OM_DATETIME_HOURS(dateTime)
 
#define OM_DATETIME_MINUTES(dateTime)
 
#define OM_DATETIME_SECONDS(dateTime)
 
#define OM_DATETIME_MIN_VALID
 
#define OM_DATETIME_MAX_VALID
 
#define OM_DATETIME_ZERO
 
#define OM_DATETIME_INFINITE
 
#define OM_DATETIME_BUFFER_SIZE   (20)
 

Typedefs

typedef unsigned long OM_DATETIME
 

Detailed Description

A representation of a date and time used by the API functions. A single integer value is used to pack the date/time for a simpler, cross-language, API.

An OM_DATETIME value can be created from date/time components using the OM_DATETIME_FROM_YMDHMS() macro.

An OM_DATETIME value can be split back into date/time components using macros: OM_DATETIME_YEAR(), OM_DATETIME_MONTH(), OM_DATETIME_DAY(), OM_DATETIME_HOURS(), OM_DATETIME_MINUTES(), OM_DATETIME_SECONDS().

Remarks
The date/time elements are packed into a single 32-bit value: (MSB) YYYYYYMM MMDDDDDh hhhhmmmm mmssssss (LSB).
See also
Example code deploy.c, for an example of how to use the date/time functions of the API in conjunction with the C time functions.

Macro Definition Documentation

◆ OM_DATETIME_BUFFER_SIZE

#define OM_DATETIME_BUFFER_SIZE   (20)

The size of a buffer to hold a string representation of an OM_DATETIME.

Definition at line 1093 of file omapi.h.

◆ OM_DATETIME_DAY

#define OM_DATETIME_DAY (   dateTime)

Extract the day (1-31) from a packed date/time value.

Definition at line 1083 of file omapi.h.

◆ OM_DATETIME_FROM_YMDHMS

#define OM_DATETIME_FROM_YMDHMS (   year,
  month,
  day,
  hours,
  minutes,
  seconds 
)

Macro to create a packed date/time value from components.

Definition at line 1073 of file omapi.h.

◆ OM_DATETIME_HOURS

#define OM_DATETIME_HOURS (   dateTime)

Extract the hours (0-23) from a packed date/time value.

Definition at line 1084 of file omapi.h.

◆ OM_DATETIME_INFINITE

#define OM_DATETIME_INFINITE

Special date/time value for "infinitely late".

See also
OmSetDelays()

Definition at line 1090 of file omapi.h.

◆ OM_DATETIME_MAX_VALID

#define OM_DATETIME_MAX_VALID

The maximum valid date/time value.

Definition at line 1088 of file omapi.h.

◆ OM_DATETIME_MIN_VALID

#define OM_DATETIME_MIN_VALID

The minimum valid date/time value.

Definition at line 1087 of file omapi.h.

◆ OM_DATETIME_MINUTES

#define OM_DATETIME_MINUTES (   dateTime)

Extract the minutes (0-59) from a packed date/time value.

Definition at line 1085 of file omapi.h.

◆ OM_DATETIME_MONTH

#define OM_DATETIME_MONTH (   dateTime)

Extract the month (1-12) from a packed date/time value.

Definition at line 1082 of file omapi.h.

◆ OM_DATETIME_SECONDS

#define OM_DATETIME_SECONDS (   dateTime)

Extract the seconds (0-59) from a packed date/time value.

Definition at line 1086 of file omapi.h.

◆ OM_DATETIME_YEAR

#define OM_DATETIME_YEAR (   dateTime)

Extract the year from a packed date/time value.

Definition at line 1081 of file omapi.h.

◆ OM_DATETIME_ZERO

#define OM_DATETIME_ZERO

Special date/time value for "infinitely early".

See also
OmSetDelays()

Definition at line 1089 of file omapi.h.

Typedef Documentation

◆ OM_DATETIME

A single integer value is used to pack the date/time for a simpler, cross-language, API.

Definition at line 332 of file omapi.h.