Welcome to Port

Port is a message-based library management database. It allows users to quickly redevelop and reconfigure applications by calling pre-written libraries. This feature simplifies the application development process, enabling users to create applications more easily and efficiently.

Please see the documentation lincense

The Requirements


Download URL


VERSION OS STABLE URL
v1.0.9 Windows x64 No v1.0.9-win-installer
v1.0.8 Windows x64 No v1.0.8-win-installer

Repository


Create new repository

port new [repository-name]

Tip

The repository name cannot contain special characters. It follows the directory naming rules provided by the operating system.

Create add gruop

port add [group-name]

Repository layout


port.toml         # The configuration file.
.enum             # The custom enum file 
AZone/            # The group directory. 
    sample1.msg   # The message file
    sample2.msg   # The message file
    sample3.msg   # The message file

BZone/            # The group directory. 
    sample1.msg   # The message file
    sample2.msg   # The message file
    sample3.msg   # The message file
...               # Other files.

Message File


message property list

name description
relation Real-time synchronization and messaging are handled within the corresponding external library. For more details, please refer to the Relation documentation.
backup Changes are saved to the backup database as they occur, ensuring that values are restored upon application restart. and values are not propagated relation messages during program execution.
property Can specify a custom property
frame Can specify a frame key value to manage subsequent frames by their key values.
rule Can specify rules to manage the values of corresponding messages.

sample1.msg

 DevAPowerStatus    enum.DeviceAStatus  relation:DeviceA.GetStatus         
 DevAErrorMessage   text                relation:DeviceA.GetErrorMessage property:{"Argument":"1,0"}
 DevCTemperature    num                 relation:DeviceC.GetTemperature property:{"MIN":0,"MAX":300}
 DevCOnOff          enum.OnOff          relation:DeviceC.OnOff           
 ...

Tip

message document do not using special characters.

Enum File


Enums are particularly useful when you have a fixed set of values that a variable can take, such as days of the week, months of the year, or status codes. They help make your code more expressive, self-documenting, and less error-prone because you're working with named constants instead of raw integer values.

custom.enum

TFalse      True:0      False:1
FTrue       False:0     True:1
OnOff       On:0        Off:1
OffOn       Off:1       On:1

Commands


Repository

Tip

The application runs based on the values stored in the repository. The push action must precede the application startup. Subsequently, users can perform a pull action at any desired moment to restore the repository.

Application

Tip

port application must be start portlib services application

Message

port set groupA sayHelloMessage1 Hello?
[set-ok]
port get groupA sayHelloMessage1
[Hello?]

View

port view --new groupA --group groupA
[CREATED][VIEW] ...
port view groupA --download C:/Downloads/gruopA.csv
[DOWNLOAD][VIEW] ...
port view groupA 1hour
[2024-05-05 12:00:00 DevCTemperature 50]
[2024-05-05 12:00:01 DevCTemperature 51]
[2024-05-05 12:00:02 DevCTemperature 50]
port view HTS.PowerStatus -1days 

[2024-01-01 11:55:32:3902 -1days:1sec] HTS.PowerStatus>DevAPowerStatus: [Normal , Normal] ...
HTS.ErrorMessage>DevAErrorMessage:[Normal, Normal] ...
HTS.Temperature>DevCTemperature: [30,32 ...]
HTS.HeaterOnOff>DevCOnOff:[Off,On ...]