Giter Site home page Giter Site logo

secs4net's Introduction

secs4net

Project Description
SECS-II/HSMS-SS/GEM implementation on .NET. This library provide easy way to communicate with SEMI standard compatible device.

1. Send message to device

try{
    var s3f18 = await device.SendAsync(s3f17); //await device's reply secondary message
    //access item value with strong type
    byte returnCode = (byte)s3f18.SecsItem.Items[0]; // access item value. Equal to s3f18.SecsItem.Items[0].Value()
}catch(SecsException){
    // exception  when
    // T3 timeout
    // device reply SxF0
    // device reply S9Fx
}

2. Receive message from device
provide a delegate to SecsGem constructor's last argument

(primaryMsg, reply) => {
    try {
       //do something for primaryMsg
       reply( secondaryMsg );  // reply secondary msg to device
    } catch (Exception ex) {

    }
};

3. SecsMessage construction is LINQ friendly

var s16f15 = new SecsMessage(16, 15, "CreateProcessJob",
                Item.L(
                    Item.U4(0),
                    Item.L(from pj in tx.ProcessJobs select
                        Item.L(
                            Item.A(pj.Id),
                            Item.B(0x0D),
                            Item.L(from carrier in pj.Carriers select
                                Item.L(
                                    Item.A(carrier.Id),
                                    Item.L(from slotInfo in carrier.SlotMap select
                                        Item.U1(slotInfo.SlotNo)))),
                            Item.L(
                                Item.U1(1),
                                Item.A(pj.RecipeId),
                                Item.L()),
                            Item.Boolean(true),
                            Item.L()))));

4. SecsMessage/Item is immutable.
5. SecsMessage/Item is .NET Remoting operatable. It mean you can build an scalable distributed device control system.

Bitdeli Badge

secs4net's People

Contributors

mkjeff avatar bitdeli-chef avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.