How to use the erpc.server.Service function in erpc

To help you get started, we’ve selected a few erpc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EmbeddedRPC / erpc-imx-demos / MPU / example_erpc / service / erpc_matrix_multiply / server.py View on Github external
#
# Generated by erpcgen 1.4.0 on Tue May  9 14:15:10 2017.
#
# AUTOGENERATED - DO NOT EDIT
#

import erpc
from . import common, interface

# Client for MatrixMultiplyService
class MatrixMultiplyServiceService(erpc.server.Service):
    def __init__(self, handler):
        super(MatrixMultiplyServiceService, self).__init__(interface.IMatrixMultiplyService.SERVICE_ID)
        self._handler = handler
        self._methods = {
                interface.IMatrixMultiplyService.ERPCMATRIXMULTIPLY_ID: self._handle_erpcMatrixMultiply,
            }

    def _handle_erpcMatrixMultiply(self, sequence, codec):
        # Create reference objects to pass into handler for out/inout parameters.
        result_matrix = erpc.Reference()

        # Read incoming parameters.
        matrix1 = []
        for _i0 in range(5):
            _v0 = []
            for _i1 in range(5):