@@ -291,9 +291,9 @@ def TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke(future: Future, eventLo
291
291
))
292
292
293
293
294
- def SendCommand (future : Future , eventLoop , responseType : Type , device , commandPath : CommandPath , payload : ClusterCommand ,
295
- timedRequestTimeoutMs : Union [ None , int ] = None , interactionTimeoutMs : Union [None , int ] = None , busyWaitMs : Union [None , int ] = None ,
296
- suppressResponse : Union [None , bool ] = None ) -> PyChipError :
294
+ async def SendCommand (future : Future , eventLoop , responseType : Type , device , commandPath : CommandPath , payload : ClusterCommand ,
295
+ timedRequestTimeoutMs : Union [None , int ] = None , interactionTimeoutMs : Union [None , int ] = None ,
296
+ busyWaitMs : Union [ None , int ] = None , suppressResponse : Union [None , bool ] = None ) -> PyChipError :
297
297
''' Send a cluster-object encapsulated command to a device and does the following:
298
298
- On receipt of a successful data response, returns the cluster-object equivalent through the provided future.
299
299
- None (on a successful response containing no data)
@@ -316,7 +316,7 @@ def SendCommand(future: Future, eventLoop, responseType: Type, device, commandPa
316
316
317
317
payloadTLV = payload .ToTLV ()
318
318
ctypes .pythonapi .Py_IncRef (ctypes .py_object (transaction ))
319
- return builtins .chipStack .Call (
319
+ return await builtins .chipStack .CallAsync (
320
320
lambda : handle .pychip_CommandSender_SendCommand (
321
321
ctypes .py_object (transaction ), device ,
322
322
c_uint16 (0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs ), commandPath .EndpointId ,
@@ -353,9 +353,9 @@ def _BuildPyInvokeRequestData(commands: List[InvokeRequestInfo], timedRequestTim
353
353
return pyBatchCommandsData
354
354
355
355
356
- def SendBatchCommands (future : Future , eventLoop , device , commands : List [InvokeRequestInfo ],
357
- timedRequestTimeoutMs : Optional [ int ] = None , interactionTimeoutMs : Optional [int ] = None , busyWaitMs : Optional [int ] = None ,
358
- suppressResponse : Optional [bool ] = None ) -> PyChipError :
356
+ async def SendBatchCommands (future : Future , eventLoop , device , commands : List [InvokeRequestInfo ],
357
+ timedRequestTimeoutMs : Optional [int ] = None , interactionTimeoutMs : Optional [int ] = None ,
358
+ busyWaitMs : Optional [ int ] = None , suppressResponse : Optional [bool ] = None ) -> PyChipError :
359
359
''' Initiates an InvokeInteraction with the batch commands provided.
360
360
361
361
Arguments:
@@ -388,7 +388,7 @@ def SendBatchCommands(future: Future, eventLoop, device, commands: List[InvokeRe
388
388
transaction = AsyncBatchCommandsTransaction (future , eventLoop , responseTypes )
389
389
ctypes .pythonapi .Py_IncRef (ctypes .py_object (transaction ))
390
390
391
- return builtins .chipStack .Call (
391
+ return await builtins .chipStack .CallAsync (
392
392
lambda : handle .pychip_CommandSender_SendBatchCommands (
393
393
py_object (transaction ), device ,
394
394
c_uint16 (0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs ),
0 commit comments