Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions discos_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ def __initialize__(self) -> None:
)
self.__update_namespace__(topic, payload)
except zmq.Again: # pragma: no cover
dummy = self._schema_merger.merge_schema(t, {})
self.__update_namespace__(t, DISCOSNamespace(**dummy))
self.__update_namespace__(t, DISCOSNamespace(
**self._schema_merger.merge_schema(t, {})
))
self._socket.unsubscribe(f'{rand_id}_{t}')
self._socket.setsockopt(zmq.RCVTIMEO, -1)
for topic in self._topics:
Expand Down
5 changes: 2 additions & 3 deletions discos_client/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def __value_repr__(cls, obj: Any) -> Any:
return {
k: cls.__value_repr__(v)
for k, v in vars(obj).items()
if not k.startswith("_") and cls.__is__(v)
if not k.startswith("_")
}
if isinstance(obj, (tuple, list)):
return [cls.__value_repr__(v) for v in obj]
Expand Down Expand Up @@ -633,6 +633,5 @@ def __dir__(self) -> None:
value = self._value
if DISCOSNamespace.__is__(value):
attrs.discard("get_value")
else:
attrs.update(dir(value))
attrs.update(dir(value))
return sorted(attrs)
222 changes: 111 additions & 111 deletions discos_client/schemas/common/receivers.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,124 +8,109 @@
"$defs": {
"boss": {
"type": "object",
"title": "Receivers Boss",
"description": "Status of the DISCOS ReceiversBoss component.",
"node": "receivers.boss",
"properties": {
"boss": {
"type": "object",
"title": "Receivers Boss",
"description": "Status of the DISCOS ReceiversBoss component.",
"node": "receivers.boss",
"properties": {
"currentReceiver": {
"type": "string",
"title": "Current Receiver",
"description": "Currently selected receiver's name."
},
"currentSetup": {
"type": "string",
"title": "Current setup",
"description": "Current DISCOS setup code"
},
"status": {
"$ref": "../definitions/status.json"
},
"timestamp": {
"$ref": "../definitions/timestamp.json"
}
},
"required": [
"currentReceiver",
"currentSetup",
"status",
"timestamp"
],
"additionalProperties": false
"currentReceiver": {
"type": "string",
"title": "Current Receiver",
"description": "Currently selected receiver's name."
},
"currentSetup": {
"type": "string",
"title": "Current setup",
"description": "Current DISCOS setup code"
},
"status": {
"$ref": "../definitions/status.json"
},
"timestamp": {
"$ref": "../definitions/timestamp.json"
}
},
"required": ["boss"],
"required": [
"currentReceiver",
"currentSetup",
"status",
"timestamp"
],
"additionalProperties": false
},
"receiver": {
"type": "object",
"patternProperties": {
"^(?!boss$).*": {
"type": "object",
"title": "Receiver status",
"description": "Status of a receiver component.",
"node": "receivers.<receiverName>",
"properties": {
"cryoTemperatureCoolHead": {
"type": "number",
"title": "Cryo temperature cool head",
"description": "Cryogenic temperature of receiver's cool head",
"unit": "K"
},
"cryoTemperatureCoolHeadWindow": {
"type": "number",
"title": "Cryo temperature cool head window",
"description": "Cryogenic temperature of receiver's cool head, window sensor",
"unit": "K"
},
"cryoTemperatureLNA": {
"type": "number",
"title": "Cryo temperature LNAs",
"description": "Cryogenic temperature of receiver's LNAs",
"unit": "K"
},
"cryoTemperatureLNAWindow": {
"type": "number",
"title": "Cryo temperature LNAs window",
"description": "Cryogenic temperature of receiver's LNAs, window sensor",
"unit": "K"
},
"environmentTemperature": {
"type": "number",
"title": "Environment temperature",
"description": "Environment temperature.",
"unit": "°C"
},
"operativeMode": {
"type": "string",
"title": "Operative mode",
"description": "Name of the current receiver operative mode."
},
"channels": {
"type": "array",
"title": "Channels",
"description": "List of receiver's channelss.",
"items": {
"$ref": "#/$defs/channel"
}
},
"status": {
"$ref": "../definitions/status.json"
},
"timestamp": {
"$ref": "../definitions/timestamp.json"
},
"vacuum": {
"type": "number",
"title": "Vacuum",
"description": "Dewar vacuum.",
"unit": "mbar"
}
},
"required": [
"cryoTemperatureCoolHead",
"cryoTemperatureCoolHeadWindow",
"cryoTemperatureLNA",
"cryoTemperatureLNAWindow",
"environmentTemperature",
"operativeMode",
"channels",
"status",
"timestamp",
"vacuum"
],
"additionalProperties": false
"title": "Receiver status",
"description": "Status of a receiver component.",
"node": "receivers.<receiverName>",
"properties": {
"cryoTemperatureCoolHead": {
"type": "number",
"title": "Cryo temperature cool head",
"description": "Cryogenic temperature of receiver's cool head",
"unit": "K"
},
"cryoTemperatureCoolHeadWindow": {
"type": "number",
"title": "Cryo temperature cool head window",
"description": "Cryogenic temperature of receiver's cool head, window sensor",
"unit": "K"
},
"cryoTemperatureLNA": {
"type": "number",
"title": "Cryo temperature LNAs",
"description": "Cryogenic temperature of receiver's LNAs",
"unit": "K"
},
"cryoTemperatureLNAWindow": {
"type": "number",
"title": "Cryo temperature LNAs window",
"description": "Cryogenic temperature of receiver's LNAs, window sensor",
"unit": "K"
},
"environmentTemperature": {
"type": "number",
"title": "Environment temperature",
"description": "Environment temperature.",
"unit": "°C"
},
"operativeMode": {
"type": "string",
"title": "Operative mode",
"description": "Name of the current receiver operative mode."
},
"channels": {
"type": "array",
"title": "Channels",
"description": "List of receiver's channelss.",
"items": {
"$ref": "#/$defs/channel"
}
},
"status": {
"$ref": "../definitions/status.json"
},
"timestamp": {
"$ref": "../definitions/timestamp.json"
},
"vacuum": {
"type": "number",
"title": "Vacuum",
"description": "Dewar vacuum.",
"unit": "mbar"
}
},
"minProperties": 1,
"maxProperties": 1,
"required": [
"cryoTemperatureCoolHead",
"cryoTemperatureCoolHeadWindow",
"cryoTemperatureLNA",
"cryoTemperatureLNAWindow",
"environmentTemperature",
"operativeMode",
"channels",
"status",
"timestamp",
"vacuum"
],
"additionalProperties": false
},
"channel": {
Expand Down Expand Up @@ -177,7 +162,22 @@
}
},
"anyOf": [
{ "$ref": "#/$defs/boss" },
{ "$ref": "#/$defs/receiver" }
{
"type": "object",
"properties": {
"boss": { "$ref": "#/$defs/boss" }
},
"required": ["boss"],
"additionalProperties": false
},
{
"type": "object",
"patternProperties": {
"^(?!boss$).*": { "$ref": "#/$defs/receiver" }
},
"minProperties": 1,
"maxProperties": 1,
"additionalProperties": false
}
]
}
Loading
Loading