Clock Entity

group ClockEntity

Provides an interface to a real-time clock entity on a BrainStem module. The clock entity may be used to get and set the real time of the system. The clock entity has a one second resolution.

Note

Clock time must be reset if power to the BrainStem module is lost.

void clock_getYear(unsigned int *id, struct Result *result)

Get the four digit year value (0-4095).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the year portion of the real time clock or a non zero Error code.

void clock_setYear(unsigned int *id, struct Result *result, int year)

Set the four digit year value (0-4095).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • year: Set the year portion of the real-time clock value.

void clock_getMonth(unsigned int *id, struct Result *result)

Get the two digit month value (1-12).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the month portion of the real time clock or a non zero Error code.

void clock_setMonth(unsigned int *id, struct Result *result, int month)

Set the two digit month value (1-12).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • month: Set the month portion of the real-time clock value.

void clock_getDay(unsigned int *id, struct Result *result)

Get the two digit day of month value (1-28, 29, 30 or 31 depending on the month).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the day portion of the real time clock or a non zero Error code.

void clock_setDay(unsigned int *id, struct Result *result, int day)

Set the two digit day of month value (1-28, 29, 30 or 31 depending on the month).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • day: Set the day portion of the real-time clock value.

void clock_getHour(unsigned int *id, struct Result *result)

Get the two digit hour value (0-23).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the hour portion of the real time clock or a non zero Error code.

void clock_setHour(unsigned int *id, struct Result *result, int hour)

Get the two digit hour value (0-59).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • hour: Set the day portion of the real-time clock value.

void clock_getMinute(unsigned int *id, struct Result *result)

Get the two digit minute value (0-59).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the minute portion of the real time clock or a non zero Error code.

void clock_setMinute(unsigned int *id, struct Result *result, int minute)

Set the two digit minute value (0-59).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • minute: Set the day portion of the real-time clock value.

void clock_getSecond(unsigned int *id, struct Result *result)

Get the two digit second value (0-59).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the second portion of the real time clock or a non zero Error code.

void clock_setSecond(unsigned int *id, struct Result *result, int second)

Set the two digit second value (0-59).

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • second: Set the day portion of the real-time clock value.