-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michel Hidalgo <[email protected]>
- Loading branch information
1 parent
3d07d05
commit d9e500d
Showing
3 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) 2024 Boston Dynamics AI Institute LLC. See LICENSE file for more info. | ||
|
||
import typing | ||
|
||
import grpc | ||
from bosdyn.api.spot_cam.ptz_pb2 import ListPtzRequest, ListPtzResponse, PtzDescription | ||
from bosdyn.api.spot_cam.service_pb2_grpc import PtzServiceServicer | ||
|
||
|
||
class MockCAMService(PtzServiceServicer): | ||
"""Mock Spot CAM services.""" | ||
|
||
def __init__(self, **kwargs: typing.Any) -> None: | ||
super().__init__(**kwargs) | ||
self.ptzs: typing.List[PtzDescription] = [] | ||
|
||
def ListPtz(self, request: ListPtzRequest, context: grpc.ServicerContext) -> ListPtzResponse: | ||
response = ListPtzResponse() | ||
response.ptzs.extend(self.ptzs) | ||
return response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters