chore: Move schema directory away from src; Migrate extensions to schema directory, update Dockerfile and configuration paths
This commit is contained in:
parent
c6314fbda0
commit
70e64448e5
14 changed files with 90 additions and 46 deletions
74
schema/extensions/display_devices.graphql
Normal file
74
schema/extensions/display_devices.graphql
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
"""
|
||||
SinglePanelDevice represents a device which can display a single picture, e.g. using LED technology.
|
||||
The picture is represented either by a displaySign (a numeric value e.g. the index of the picture)
|
||||
or a contentKey, which is usually the hash of the bitmap which shall be displayed.
|
||||
"""
|
||||
type SinglePanelDevice implements Host & Device {
|
||||
hostid: ID!
|
||||
"""
|
||||
Per convention a uuid is used as hostname to identify devices if they do not have a unique hostname
|
||||
"""
|
||||
host: String!
|
||||
deviceType: String
|
||||
hostgroups: [HostGroup!]
|
||||
name: String
|
||||
tags: JSONObject
|
||||
state: PanelState
|
||||
}
|
||||
|
||||
type PanelState implements DeviceState {
|
||||
operational: OperationalDeviceData
|
||||
current: PanelCurrentState
|
||||
}
|
||||
|
||||
type PanelCurrentState {
|
||||
values: PanelValues
|
||||
}
|
||||
|
||||
type PanelValues {
|
||||
"""
|
||||
Index of the bitmap which is displayed
|
||||
"""
|
||||
contentIndex: Int
|
||||
"""
|
||||
Hash of the bitmap which is displayed
|
||||
"""
|
||||
contentKey: String
|
||||
"""
|
||||
Text representation of what is displayed
|
||||
"""
|
||||
contentText: String
|
||||
}
|
||||
|
||||
"""
|
||||
The FourPanelDevice is a panel which allows to define pictures in 4
|
||||
subpanels, called TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT
|
||||
"""
|
||||
type FourPanelDevice implements Host & Device {
|
||||
hostid: ID!
|
||||
"""
|
||||
Per convention a uuid is used as hostname to identify devices if they do not have a unique hostname
|
||||
"""
|
||||
host: String!
|
||||
deviceType: String
|
||||
hostgroups: [HostGroup!]
|
||||
name: String
|
||||
tags: JSONObject
|
||||
state: FourPanelState
|
||||
}
|
||||
|
||||
type FourPanelState implements DeviceState {
|
||||
operational: OperationalDeviceData
|
||||
current: FourPanelCurrentState
|
||||
}
|
||||
|
||||
type FourPanelCurrentState {
|
||||
values: FourPanelValues
|
||||
}
|
||||
|
||||
type FourPanelValues {
|
||||
TOP_LEFT: PanelValues
|
||||
TOP_RIGHT: PanelValues
|
||||
BOTTOM_LEFT: PanelValues
|
||||
BOTTOM_RIGHT: PanelValues
|
||||
}
|
||||
60
schema/extensions/location_tracker_commons.graphql
Normal file
60
schema/extensions/location_tracker_commons.graphql
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
|
||||
|
||||
"""
|
||||
Represents the payload for a sensor distance measurement.
|
||||
"""
|
||||
type SensorDistanceValue implements DeviceValue {
|
||||
"""
|
||||
Represents the name of the device that reports or provides distance sensor data.
|
||||
Uniquely identifies the device within the context of the SensorDistanceValue.
|
||||
"""
|
||||
deviceName: String
|
||||
|
||||
"""
|
||||
Represents the MAC address of the device. Typically formatted as a 12-character
|
||||
hexadecimal string (e.g., "00:1A:2B:3C:4D:5E").
|
||||
"""
|
||||
mac: String
|
||||
|
||||
"""
|
||||
Represents the measured or calculated distance value, typically in meters.
|
||||
Should be non-negative.
|
||||
"""
|
||||
distance: Float
|
||||
|
||||
"""
|
||||
Represents the time at which the sensor measurement was recorded.
|
||||
"""
|
||||
time: String
|
||||
|
||||
_empty: String
|
||||
}
|
||||
|
||||
"""
|
||||
Represents a coordinate in 3D space with x, y, and z components.
|
||||
"""
|
||||
type Position {
|
||||
x: Float
|
||||
y: Float
|
||||
z: Float
|
||||
}
|
||||
|
||||
"""
|
||||
Represents the result of a position calculation, including the calculated position and accuracy.
|
||||
"""
|
||||
type PositionCalculatorResult {
|
||||
position: Position
|
||||
accuracy: Float
|
||||
}
|
||||
|
||||
"""
|
||||
Concrete implementation of a DeviceValueMessage for sensor distance data.
|
||||
"""
|
||||
type SensorDistanceMessage implements DeviceValueMessage {
|
||||
deviceKey: String
|
||||
timestamp: String
|
||||
attributeName: String
|
||||
topicName: String
|
||||
deviceType: String
|
||||
value: SensorDistanceValue
|
||||
}
|
||||
45
schema/extensions/location_tracker_devices.graphql
Normal file
45
schema/extensions/location_tracker_devices.graphql
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
"""
|
||||
DistanceTracker represents a device which can detect other devices around itself and estimate
|
||||
the distances, e.g. by using Bluetooth scanning technology and estimating the distance by .
|
||||
Optionally the
|
||||
"""
|
||||
type DistanceTrackerDevice implements Host & Device {
|
||||
hostid: ID!
|
||||
"""
|
||||
Per convention a uuid is used as hostname to identify devices if they do not have a unique hostname
|
||||
"""
|
||||
host: String!
|
||||
deviceType: String
|
||||
hostgroups: [HostGroup!]
|
||||
name: String
|
||||
tags: JSONObject
|
||||
state: DistanceTrackerState
|
||||
}
|
||||
|
||||
type DistanceTrackerState implements DeviceState {
|
||||
operational: OperationalDeviceData
|
||||
current: DistanceTrackerValues
|
||||
}
|
||||
|
||||
"""
|
||||
Aggregated information of devices detected around the tracker
|
||||
"""
|
||||
type DistanceTrackerValues {
|
||||
"""
|
||||
Start of time interval for the delivered device counting value
|
||||
"""
|
||||
timeFrom: Time
|
||||
"""
|
||||
End of time interval for the delivered device counting value
|
||||
"""
|
||||
timeUntil: Time
|
||||
|
||||
"""
|
||||
Number of unique deviceKeys detected between timeFrom and timeUnti
|
||||
"""
|
||||
count: Int
|
||||
"""
|
||||
Detailed information about devices detected nearby
|
||||
"""
|
||||
distances: [SensorDistanceValue!]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue