Open Athvaith2828 opened 2 weeks ago
1st part yes. 2nd part not yet but there is a branch for it here https://github.com/boschglobal/kuksa-python-sdk/tree/feature/StreamedSet
Thank you for the quick response, @lukasmittag . I'm happy to test the Stream Update functionality—just wanted to check if it's ready for testing from a functionality standpoint ?, Additionally, I have one more question: is sdv/databroker/v1 also supported by the Python SDK?
no the python sdk only supports the kuksa.val.v1 interface. In past versions it supported sdv.databroker.v1.
@lukasmittag , I am able to access the client.StreamGenerator() function and I understand that it requires a queue to be passed in. Could you provide a simple example of how to use this function to update Vehicle.Speed? That would be very helpful.
I have no example at my hands as of now. But basically you can do the following:
async def __stream_generator() -> AsyncIterator[StreamedUpdateRequest]:
updates: List[EntryUpdate] = <create an EntryUpdate>
yield StreamedUpdateRequest(updates=updates)
call = StreamedUpdate(self.__stream_generator())
this will once do update it. If you want to update it more often you need to either do a loop in stream generator or use self.queue and another component that provides speed values to the queue by doing queue.put()
and queue.get()
for creating an entryUpdate you can have a look at prepare_streamed_set_request()
here https://github.com/boschglobal/kuksa-python-sdk/blob/8a0b494b85d01a70f79cb82d77d9c810a0edddf1/kuksa-client/kuksa_client/grpc/__init__.py#L628
Is StreamUpadate grpc functionality is available in 0.4.6 (latest) release ? and is python-sdk supports StreamUpdate ?