diff --git a/synapse-api b/synapse-api index 0d0e786..c0bc469 160000 --- a/synapse-api +++ b/synapse-api @@ -1 +1 @@ -Subproject commit 0d0e786ffeb5d0fc95fcd2a7eef482e72e6ae076 +Subproject commit c0bc469e3e0eb045dadb4f3b39e2aa3d727ee43e diff --git a/synapse/client/nodes/stream_in.py b/synapse/client/nodes/stream_in.py index 2f7983a..d33b38c 100644 --- a/synapse/client/nodes/stream_in.py +++ b/synapse/client/nodes/stream_in.py @@ -14,12 +14,13 @@ class StreamIn(Node): type = NodeType.kStreamIn - def __init__(self, data_type: DataType): + def __init__(self, data_type: DataType, shape: List[int]): self.__sequence_number = 0 self.__socket = socket.socket( socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP ) self.data_type = data_type + self.shape = shape def write(self, data: SynapseData): if self.device is None: @@ -76,6 +77,7 @@ def _to_proto(self): n = NodeConfig() i = StreamInConfig() i.data_type = self.data_type + i.shape = self.shape n.stream_in.CopyFrom(i) return n @@ -88,4 +90,4 @@ def _from_proto(proto: Optional[StreamInConfig]): if not isinstance(proto, StreamInConfig): raise ValueError("proto is not of type StreamInConfig") - return StreamIn(data_type=proto.data_type) + return StreamIn(data_type=proto.data_type, shape=proto.shape)