Code Monkey home page Code Monkey logo

Comments (1)

nickkaranatsios avatar nickkaranatsios commented on August 9, 2024

Currently coded messages:

  • Hello
  • EchoRequest
  • FeaturesRequest
  • GetConfigRequest
  • SetConfig

Messages are also reside in a separate directory (messages) and for each message we have a Ruby class that defines the object and a corresponding c file with a pack method that creates the buffer object representation ready for transmission. A typical message class looks like the following:

require "trema/message-accessor"


module Trema
  module Messages
    class EchoRequest < MessageAccessor
      unsigned_int32 :transaction_id
      array :user_data
    end
  end
end

Again the MessageAccessor class name TBD.
Takamiya-san I am thinking of using the current controller helper methods like send_flow_mod_xxx but in addition create a corresponding Message object (FlowMod{Add,Modify,Delete} not only for processing and validating its options but also for storing the object for later reference if needed. Any thoughts on this subject. This would help me design the flow_mod message. Need also to check how set_match_from_packet would work. Hopefully I can have the learning-switch.rb going by the end of this week that's my target anyway.
Also which form of class decleration you prefer the multi-line one or the shorter version. For example:

module Trema
  module ActionList
    class CopyTtlOut < ActionAccessor
    end
  end
end

OR

class Trema::ActionList::CopyTtlOut < Trema::ActionAccessor
end

from trema-edge.

Related Issues (20)

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.