OpenController Proto
A Protocol Buffer schema representing an OpenController module.
A message representing a function call
| Field | Type | Label | Description |
| calling | Expr | required | The expression to call |
| args | Expr | repeated | The arguments to pass |
A message representing a controller
| Field | Type | Label | Description |
| id | Expr | required | A unique id for the controller |
| display_name | Expr | required | The name to be displayed by clients |
| brand_color | Expr | optional | A brand color to be displayed by clients |
| display_interface | Expr | optional | The interface for display clients for the Controller |
A message representing a controllable device
| Field | Type | Label | Description |
| lambdas | DeviceExpr.LambdasEntry | repeated | The actions the Device is capable of |
| Field | Type | Label | Description |
| key | string | optional |
|
| value | Expr | optional |
|
A Controller interface for clients with displays
| Field | Type | Label | Description |
| widgets | Expr | repeated | The Widgets that make up the controller. Implementation Notes: The layout of the widgets in the array is flexible for the client. |
A message representing an else-if
| Field | Type | Label | Description |
| condition | Expr | required | The condition to call if |
| then | Expr | required | The expression to call |
A message representing an expression
| Field | Type | Label | Description |
| position | Position | optional | The position of the expression in the source code |
| ref | RefExpr | optional |
|
| lambda | LambdaExpr | optional |
|
| call | CallExpr | optional |
|
| string | string | optional |
|
| int64 | int64 | optional |
|
| int32 | int32 | optional |
|
| float | float | optional |
|
| bool | bool | optional |
|
| house | HouseExpr | optional |
|
| room | RoomExpr | optional |
|
| controller | ControllerExpr | optional |
|
| display_interface | DisplayInterfaceExpr | optional |
|
| device | DeviceExpr | optional |
|
| widget | WidgetExpr | optional |
|
| if | IfExpr | optional |
|
The root message representing a house. *
| Field | Type | Label | Description |
| display_name | Expr | required | The name to be displayed by clients |
| id | Expr | required | A unique identifier |
| rooms | Expr | repeated | The Rooms inside the House |
A message representing an if expression
| Field | Type | Label | Description |
| condition | Expr | required | The condition to call if |
| then | Expr | required | The expression to call |
| elif | Elif | repeated | The else-if conditions |
| else | Expr | required | The else condition |
A message representing a lambda expression
| Field | Type | Label | Description |
| args | string | repeated | The args to the lambda |
| return | Expr | required | The return of the lambda |
A message representing an OpenController module
| Field | Type | Label | Description |
| imports | Module.ImportsEntry | repeated | The imports of the module |
| body | Expr | required | The body of the module |
| Field | Type | Label | Description |
| key | string | optional |
|
| value | Module | optional |
|
A message representing the position of an expression in source code
| Field | Type | Label | Description |
| file | string | required | The file path |
| line | int32 | required | The line number |
| column | int32 | required | The column number |
A message representing a reference to the cope
| Field | Type | Label | Description |
| ref | string | required | The name of the desired reference in the scope |
A message representing a room.
| Field | Type | Label | Description |
| id | Expr | required | A unique id for the room |
| display_name | Expr | required | The name to be displayed by clients |
| controllers | Expr | repeated | The Controllers inside the Room |
| icon | Expr | optional | The icon of the Room to be displayed by clients |
A message representing any controller widget that can be displayed by clients
| Field | Type | Label | Description |
| widget_type | string | required | The type of widget |
| params | WidgetExpr.ParamsEntry | repeated | The parameters to the widget |
| children | Expr | repeated | The children of the widget |
| Field | Type | Label | Description |
| key | string | optional |
|
| value | Expr | optional |
|
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
| double | double | double | float | float64 | double | float | Float | |
| float | float | float | float | float32 | float | float | Float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |