/* * Automatically generated by jrpcgen 1.0.7 on 06/11/2016 * jrpcgen is part of the "Remote Tea.Net" ONC/RPC package for C# * See http://remotetea.sourceforge.net for details */ using org.acplt.oncrpc; using System.Net; /** * The class gpio_server_oncrpcClient implements the client stub proxy * for the GPIO_SERVER_ONCRPC remote program. It provides method stubs * which, when called, in turn call the appropriate remote method (procedure). */ public class gpio_server_oncrpcClient : OncRpcClientStub { /** * Constructs a gpio_server_oncrpcClient client stub proxy object * from which the GPIO_SERVER_ONCRPC remote program can be accessed. * @param host Internet address of host where to contact the remote program. * @param protocol {@link org.acplt.oncrpc.OncRpcProtocols Protocol} to be * used for ONC/RPC calls. * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public gpio_server_oncrpcClient(IPAddress host, int protocol) : base(host, gpio_server_oncrpc.GPIO_SERVER_ONCRPC, 1, 0, protocol) { } /** * Constructs a gpio_server_oncrpcClient client stub proxy object * from which the GPIO_SERVER_ONCRPC remote program can be accessed. * @param host Internet address of host where to contact the remote program. * @param port Port number at host where the remote program can be reached. * @param protocol {@link org.acplt.oncrpc.OncRpcProtocols Protocol} to be * used for ONC/RPC calls. * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public gpio_server_oncrpcClient(IPAddress host, int port, int protocol) : base(host, gpio_server_oncrpc.GPIO_SERVER_ONCRPC, 1, port, protocol) { } /** * Constructs a gpio_server_oncrpcClient client stub proxy object * from which the GPIO_SERVER_ONCRPC remote program can be accessed. * @param client ONC/RPC client connection object implementing a particular * protocol. * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public gpio_server_oncrpcClient(OncRpcClient client) : base(client) { } /** * Constructs a gpio_server_oncrpcClient client stub proxy object * from which the GPIO_SERVER_ONCRPC remote program can be accessed. * @param host Internet address of host where to contact the remote program. * @param program Remote program number. * @param version Remote program version number. * @param protocol {@link org.acplt.oncrpc.OncRpcProtocols Protocol} to be * used for ONC/RPC calls. * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public gpio_server_oncrpcClient(IPAddress host, int program, int version, int protocol) : base(host, program, version, 0, protocol) { } /** * Constructs a gpio_server_oncrpcClient client stub proxy object * from which the GPIO_SERVER_ONCRPC remote program can be accessed. * @param host Internet address of host where to contact the remote program. * @param program Remote program number. * @param version Remote program version number. * @param port Port number at host where the remote program can be reached. * @param protocol {@link org.acplt.oncrpc.OncRpcProtocols Protocol} to be * used for ONC/RPC calls. * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public gpio_server_oncrpcClient(IPAddress host, int program, int version, int port, int protocol) : base(host, program, version, port, protocol) { } class XdrAble_1: XdrAble { public int pin; public int direction; public int state; public void xdrEncode(XdrEncodingStream xdr) { xdr.xdrEncodeInt(pin); xdr.xdrEncodeInt(direction); xdr.xdrEncodeInt(state); } public void xdrDecode(XdrDecodingStream xdr) { } }; /** * Call remote procedure gpio_open_1. * @param pin parameter (of type int) to the remote procedure call. * @param direction parameter (of type int) to the remote procedure call. * @param state parameter (of type int) to the remote procedure call. * @return Result from remote procedure call (of type int). * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public int gpio_open_1(int pin, int direction, int state) { XdrAble_1 args_ = new XdrAble_1(); args_.pin = pin; args_.direction = direction; args_.state = state; XdrInt result_ = new XdrInt(); client.call(gpio_server_oncrpc.gpio_open_1, gpio_server_oncrpc.GPIO_SERVER_ONCRPC_VERS, args_, result_); return result_.intValue(); } /** * Call remote procedure gpio_close_1. * @param pin parameter (of type int) to the remote procedure call. * @return Result from remote procedure call (of type int). * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public int gpio_close_1(int pin) { XdrInt args_ = new XdrInt(pin); XdrInt result_ = new XdrInt(); client.call(gpio_server_oncrpc.gpio_close_1, gpio_server_oncrpc.GPIO_SERVER_ONCRPC_VERS, args_, result_); return result_.intValue(); } /** * Call remote procedure gpio_read_1. * @param pin parameter (of type int) to the remote procedure call. * @return Result from remote procedure call (of type int). * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public int gpio_read_1(int pin) { XdrInt args_ = new XdrInt(pin); XdrInt result_ = new XdrInt(); client.call(gpio_server_oncrpc.gpio_read_1, gpio_server_oncrpc.GPIO_SERVER_ONCRPC_VERS, args_, result_); return result_.intValue(); } class XdrAble_4: XdrAble { public int pin; public int state; public void xdrEncode(XdrEncodingStream xdr) { xdr.xdrEncodeInt(pin); xdr.xdrEncodeInt(state); } public void xdrDecode(XdrDecodingStream xdr) { } }; /** * Call remote procedure gpio_write_1. * @param pin parameter (of type int) to the remote procedure call. * @param state parameter (of type int) to the remote procedure call. * @return Result from remote procedure call (of type int). * @throws OncRpcException if an ONC/RPC error occurs. * @throws IOException if an I/O error occurs. */ public int gpio_write_1(int pin, int state) { XdrAble_4 args_ = new XdrAble_4(); args_.pin = pin; args_.state = state; XdrInt result_ = new XdrInt(); client.call(gpio_server_oncrpc.gpio_write_1, gpio_server_oncrpc.GPIO_SERVER_ONCRPC_VERS, args_, result_); return result_.intValue(); } } // End of gpio_server_oncrpcClient.cs