roadsideunit table structure

roadsideunit table structure#

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

unit_id*

INTEGER

NO

RSU identifier

link

INTEGER

NO

Link(link)

bidirectional link where the RSU is

dir

INTEGER

NO

0

direction (0 for AB, 1 for BA)

position

REAL

NO

0

position along the link

power

REAL

NO

0

transmission/power capability (currently not used by POLARIS)

collected_info

TEXT

YES

type of data exchanged with vehicles (currently not used by POLARIS)

Logging_interval_seconds

INT

NO

0

data logging interval (currently not used by POLARIS)

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE IF NOT EXISTS "Roadsideunit"(
    "unit_id"                  INTEGER UNIQUE NOT NULL PRIMARY KEY,
    "link"                     INTEGER        NOT NULL,
    "dir"                      INTEGER        NOT NULL DEFAULT 0,
    "position"                 real           NOT NULL DEFAULT 0,
    "power"                    REAL           not null DEFAULT 0,
    "collected_info"           TEXT,
    "Logging_interval_seconds" int            not null DEFAULT 0,
    CONSTRAINT "link_fk" FOREIGN KEY ("link") REFERENCES "Link" ("link") DEFERRABLE INITIALLY DEFERRED -- check
);