Socket
Book a DemoInstallSign in
Socket

cresip

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cresip

0.9.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Ruby CresIP

Constructs and parses Crestron IP protocol packets that make it easier to communicate with Crestron devices that would otherwise require a crestron controller. It does not implement the transport layer so you can use it with native ruby, eventmachine, celluloid or the like.

Build Status

You'll still need to use Crestron Toolbox software to configure the devices.

Install the gem

Install it with RubyGems

gem install cresip

or add this to your Gemfile if you use Bundler:

gem 'cresip'

Usage

require 'cresip'

values = {}
cresip = CresIP.new do |message|
    case message
    when Action
        if message.feedback?
            values[message.join] = message.value
        else
            values[message.join] = message.value
            # The request is a set value so maybe perform some action
        end
    when Echo
        if not message.is_response?
            # Send a response using you TCP transport
            message.response.to_binary_s
        end
    when Register
        if not message.reg_success?
            # Send a response using you TCP transport
            message.register.to_binary_s
        end
    end
end
cresip.read(byte_string)


# You can also generate your own actions
act = CresIP::Action.new

# Supports Strings, Integers and true / false values
act.value = 'hello crestron'
act.join = 123

# Send this string over the wire to communicate
act.to_binary_s

MIT

FAQs

Package last updated on 25 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.