Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Description
Addresses issue #
_Please include a summary of the change and which issue is fixed (if any). Please also
include relevant motivation and context. List any dependencies that are required for
this change._

Fixes # (issue)

## Type of change

- [ ] Documentation (non-breaking change that adds or improves the documentation)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Optimization (non-breaking, back-end change that speeds up the code)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Breaking change (whatever its nature)

## Key checklist

- [ ] All tests pass (eg. `python -m pytest`)
- [ ] Pre-commit hooks run successfully (eg. `pre-commit run --all-files`)

## Further checks

- [ ] Code is commented, particularly in hard-to-understand areas
- [ ] Tests added or an issue has been opened to tackle that in the future.
(Indicate issue here: # (issue))
4 changes: 2 additions & 2 deletions python_not_for_dunedaq/druncschema/controller_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions python_not_for_dunedaq/druncschema/controller_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def __init__(self, channel):
request_serializer=druncschema_dot_request__response__pb2.Request.SerializeToString,
response_deserializer=druncschema_dot_request__response__pb2.Response.FromString,
_registered_method=True)
self.to_error = channel.unary_unary(
'/dunedaq.druncschema.Controller/to_error',
request_serializer=druncschema_dot_request__response__pb2.Request.SerializeToString,
response_deserializer=druncschema_dot_request__response__pb2.Response.FromString,
_registered_method=True)


class ControllerServicer(object):
Expand Down Expand Up @@ -160,6 +165,12 @@ def who_is_in_charge(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def to_error(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_ControllerServicer_to_server(servicer, server):
rpc_method_handlers = {
Expand Down Expand Up @@ -218,6 +229,11 @@ def add_ControllerServicer_to_server(servicer, server):
request_deserializer=druncschema_dot_request__response__pb2.Request.FromString,
response_serializer=druncschema_dot_request__response__pb2.Response.SerializeToString,
),
'to_error': grpc.unary_unary_rpc_method_handler(
servicer.to_error,
request_deserializer=druncschema_dot_request__response__pb2.Request.FromString,
response_serializer=druncschema_dot_request__response__pb2.Response.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'dunedaq.druncschema.Controller', rpc_method_handlers)
Expand Down Expand Up @@ -525,3 +541,30 @@ def who_is_in_charge(request,
timeout,
metadata,
_registered_method=True)

@staticmethod
def to_error(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/dunedaq.druncschema.Controller/to_error',
druncschema_dot_request__response__pb2.Request.SerializeToString,
druncschema_dot_request__response__pb2.Response.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2 changes: 2 additions & 0 deletions schema/druncschema/controller.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ service Controller {
rpc take_control (Request) returns (Response) {}
rpc surrender_control (Request) returns (Response) {}
rpc who_is_in_charge (Request) returns (Response) {}

rpc to_error (Request) returns (Response) {}
}

message AddressedCommand {
Expand Down