forked from M-Labs/artiq
coredevice/comm_kernel: attributes writeback update
This commit is contained in:
parent
bd3ab50a09
commit
6aec423838
|
@ -658,10 +658,10 @@ class CommKernel:
|
||||||
return_tags = self._read_bytes()
|
return_tags = self._read_bytes()
|
||||||
|
|
||||||
if service_id == 0:
|
if service_id == 0:
|
||||||
def service(header, *values):
|
def service(*values):
|
||||||
counter = 0
|
counter = 0
|
||||||
for obj in json.loads(header):
|
for obj in embedding_map.attributes_writeback:
|
||||||
old_val = embedding_map.globals_map[obj["id"]]
|
old_val = obj["obj"]
|
||||||
if "fields" in obj:
|
if "fields" in obj:
|
||||||
for name in obj["fields"]:
|
for name in obj["fields"]:
|
||||||
setattr(old_val, name, values[counter])
|
setattr(old_val, name, values[counter])
|
||||||
|
|
|
@ -9,7 +9,7 @@ class EmbeddingMap:
|
||||||
self.string_map = {}
|
self.string_map = {}
|
||||||
self.string_reverse_map = {}
|
self.string_reverse_map = {}
|
||||||
self.function_map = {}
|
self.function_map = {}
|
||||||
self.globals_map = {}
|
self.attributes_writeback = []
|
||||||
|
|
||||||
# preallocate exception names
|
# preallocate exception names
|
||||||
# must be kept in sync with EXCEPTION_ID_LOOKUP in artiq/firmware/ksupport/eh_artiq.rs,
|
# must be kept in sync with EXCEPTION_ID_LOOKUP in artiq/firmware/ksupport/eh_artiq.rs,
|
||||||
|
|
Loading…
Reference in New Issue