# grpc-orin3-provider `grpc-orin3-provider` is a Ruby client Gem that provides a wrapper for the ORiN3 gRPC interface. It enables seamless interaction with a variety of devices and resources, allowing users to leverage ORiN3 functionalities in a language-agnostic and platform-independent manner. ## Features - **gRPC Wrapper** Easily access the ORiN3 gRPC API through a Ruby client. - **Multi-Device Support** ORiN3 provides a unified interface to connect with diverse devices and resources, with broad applications across industries including manufacturing. - **Cross-Platform Compatibility** ORiN3 supports both Windows and Linux, and this Ruby client is designed for cross-platform use. ## Installation Install the Gem by running: ```shell gem install grpc-orin3-provider ``` Or add it to your Gemfile and run `bundle install`: ```ruby gem 'grpc-orin3-provider' ``` ### Usage 1. **Initialize the Client** Connect to the ORiN3 provider by specifying the host and port. ```ruby # Shorten namespaces for readability module ORiN3 include Message::ORiN3::Common::V1::AutoGenerated include Message::ORiN3::Provider::V1::AutoGenerated::RootObject end def main # Create a gRPC client stub stub = ORiN3::RootObjectService::Stub.new('localhost:50051', :this_channel_is_insecure) # Prepare the request request = ORiN3::GetRootObjectIdRequest.new(common: ORiN3::CommonRequest.new) # Call the RPC method response = stub.get_root_object_id(request) puts "Response: #{response.rootObjectId}" rescue GRPC::BadStatus => e abort "ERROR: #{e.message}" end ``` 2. **Error Handling** Proper error handling is included to manage any gRPC request failures. ```ruby begin response = stub.get_root_object_id(request) rescue GRPC::BadStatus => e puts "ERROR: #{e.common.detail}" end ``` ## About ORiN3 ORiN3 (Open Robot/Resource interface for the Network) is an open standard communication interface designed to facilitate seamless communication with robots and resources on a network. Built with gRPC, ORiN3 provides cross-platform capabilities, making it suitable for various industries and applications. For more details, see the [ORiN3 GitHub repository](https://github.com/ORiNConsortium/ORiN3). ## License `grpc-orin3-provider` is released under the MIT License. For details, please see the [LICENSE](LICENSE.txt) file.