Home  Contents

os.uname

OS Core4 Lua Commands

SYNOPSIS

data = os.uname()

DESCRIPTION

Provides information about the system platform.

RETURN VALUE

Returns a table providing:

Field Descriptions
cpu_manufacturer Name of the main CPU manufacturer.
cpu_model Model name of the main CPU
cpu ID code that uniquely matches the CPU architecture.
board_manufacturer Name of the controller board manufacturer.
board_model Model name of the controller board.
board_sw_datecode Datecode of the board revision that this board is compatible with.
board_hw_datecode Datecode of the board revision that is printed on the board.
machine board_manufacturer and board_model put together with a space.
made A Date/Time value indicating the manufacturing date of the controller board. Value is based on UTC.
ssn The serial number of the controller board.
serial_number The serial number of the controller board in a way meant for display.
guid A globally unique identifier that indentifies the board.
sysname Describes the operating system, always "Teratronik Core4"
release Version information for the base operating system.
compiled A Date/Time value indicating when the base operating system was compiled. Value is based on UTC.

NOTES

The board datecodes are four digit integers in the format YYWW (YY=Year of design, WW=Week of design). The first boards of a series might have a zero datecode.

The hardware datecode board_hw_datecode is a copy of the datecode that is printed on the board itself. It should be used for informational purposes only. Compatibility decisions must be made with the software datecode.

The software datecode board_sw_datecode indicates a compatibility level. A firmware file is compatible to this board if the firmware file has a datecode that is the same or later than the software datecode reported by os.uname(). A firmware's datecode can be checked by using os.checkFirmwareFile().

When a later board design is published that is still fully software-compatible to a previous version, that board reports an older software datecode. The board will have a newer hardware datecode, however.

When printing a datecode to a user display, it is recommended to use the format DWWYY. The order WWYY is widely used in the electronics industry.

The reason for storing the datecode as YYWW instead is because this makes comparing datecodes trivial in software.

Example: datecode=1701 should be printed as D0117, matching the format that is printed on the controller board itself.