-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeta.lua
More file actions
109 lines (84 loc) · 4.42 KB
/
Copy pathmeta.lua
File metadata and controls
109 lines (84 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
--[[-----------------------------------------------------------------------------
/*!
\file
\copyright 2025 Pharos Architectural Controls LTD. as an unpublished work. All Rights Reserved.
*/
--]]-----------------------------------------------------------------------------
---------------------------------------------------------------------------------
--[[ Pharos Types ]]--
---------------------------------------------------------------------------------
---@alias UniverseKey string
---@alias SpaceId number
---------------------------------------------------------------------------------
--[[ Handlers ]]--
---------------------------------------------------------------------------------
-- ExecuteCommand
-- Function called by Director when a command is received for this DriverWorks driver
---@type table<string, fun(PARAM: table)>
EC = {}
---------------------------------------------------------------------------------
-- ReceivedFromProxy
-- Function called by Director when a proxy bound to the specified binding sends a BindMessage to the DriverWorks driver
---@type table<BINDING_ID, fun(PARAM: BINDING_ID, PARAM: string, PARAM: table)>
RFP = {}
---------------------------------------------------------------------------------
-- OnPropertyChanged
-- Function called by Director when a property changes value.
---@type table<string, fun(PARAM: any)>
OPC = {}
---------------------------------------------------------------------------------
--[[ Control messages ]]--
---------------------------------------------------------------------------------
---@class CONTROL_MSG_SEND_TO_CONTROLLER_WS
---@field payload string Payload to send
---@class CONTROL_MSG_SEND_TO_CONTROLLER_HTTP
---@field method HTTP_REQUEST_METHOD HTTP request method
---@field path string Request path
---@field payload string Payload to send
---@field requestId integer? Request identifier returned with the HTTP result
---@field responseCommand string? Command used to return the HTTP result
---@field responseDeviceId integer? Device that receives the HTTP result
---@class CONTROL_MSG_HTTP_RESULT
---@field requestId integer
---@field responseCode integer
---@field errorCode integer
---@field errorMessage string
---@field responseBody string HTTP response body returned with the result
---@class CONTROL_MSG_CHANNEL_LEVEL
---@field level integer
---@class CONTROL_MSG_SPACE_ACTIVE
---@field intensityMaster integer
---@field sceneNum integer Active scene number
---@class CONTROL_MSG_SPACE_SCENES
---@field scenes string JSON Encoded table<integer, string>
---@class CONTROL_MSG_TAGSET_TAGS
---@field tags string JSON Encoded table<integer, string>
---@class CONTROL_MSG_TAGSET_ACTIVE
---@field tagNum integer
---@class CONTROL_MSG_TRIGGER_NAMES
---@field triggers string JSON Encoded table<integer, string>
---------------------------------------------------------------------------------
--[[ light_v2 ]]--
---------------------------------------------------------------------------------
---@class PROXY_MSG_LIGHT_V2_SET_BRIGHTNESS_TARGET
---@field LIGHT_BRIGHTNESS_TARGET number Value as defined from drivers Min and Max brightness capabilities as set by the driver
---@field RATE integer Milliseconds for the ramp duration
---@class PROXY_MSG_LIGHT_V2_LIGHT_BRIGHTNESS_CHANGED
---@field LIGHT_BRIGHTNESS_CURRENT number Raw value of where the light brightness stopped.
---@field LIGHT_BRIGHTNESS_CURRENT_PRESET_ID integer? This should only be included if presets levels are defined and the level is equal to the preset
---------------------------------------------------------------------------------
--[[ keypad ]]--
---------------------------------------------------------------------------------
---@class PROXY_MSG_KEYPAD_NEW_KEYPAD_BUTTON
---@field BUTTON_ID integer The ID of the button being changed
---@field NAME string? The name of the button
---@field ON_COLOR string? The on/press color for the button
---@field OFF_COLOR string?The off/release color for the button
---@field BUTTON_BEHAVIOR integer? The behavior for the button
---@field LED_BEHAVIOR integer? The LED behavior for the button
---@field SLOTS integer The number of slots the button takes up on the keypad.
---@class PROXY_MSG_KEYPAD_DELETE_KEYPAD_BUTTON
---@field BUTTON_ID integer The ID of the button to be deleted
---@class PROXY_MSG_KEYPAD_KEYPAD_BUTTON_ACTION
---@field ACTION KEYPAD_BUTTON_ACTION The action performed on the keypad
---@field BUTTON_ID integer The ID of the button where the action is performed