Protocol implementation boost

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Protocol implementation boost

RAM.KARIDAS 拉姆

    I am new here, I am looking for an example for protocol implementation through boost spirit.

I would like to know if Boost spirit is better to use in following case.

 

    Implement protocols stacks for in-house built PLCs and variety of hardware

    e devices used automation industry. Different hard ware support different

     protocols like mobbus, Modbus tcp/IP. We use c++. We are yet to implement CANopen,   EitherNET/IP, EitherCAT. The current communication module uses old method

s programming. They use unsigned Char, some classes structure, and use long switch cases and complex if statements to send/receive packets from PLC device. The whole structure seems complex, very long linear and there is repetitive code.

 

 

    Any right directions is highly appreciated.

   

 

 

Ramakrishnananda Karidas

 

 

*************************************************************************
This email message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message. [Delta Electronics, INC. Taiwan]
*************************************************************************

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Protocol implementation boost

cppljevans
On 10/02/2014 01:36 AM, RAM.KARIDAS 拉姆 wrote:

Hi Ramakrishnananda,

In the following quote of your post, some corrections were made (which
I hope are correct) and some reformatting done to make it easier to
read.  Sorry if I made some mistakes :)

> I am new here, I am looking for an example for protocol
> implementation through boost spirit.  I would like to know if Boost
> spirit is better to use in following case.

>   Implement protocols stacks for in-house built PLCs and variety of
>   hardware devices used in automation industry. These hardware
>   devices support different protocols like mobbus, Modbus tcp/IP. We
>   use c++. We have yet to implement CANopen, EitherNET/IP, and
>   EitherCAT. The current communication module uses old methods of
>   programming. They use unsigned Char, some classes structure, and
>   use long switch cases and complex if statements to send/receive
>   packets from PLC device. The whole structure seems complex, very
>   long linear and there is repetitive code.

I've long thought that *maybe* the combination of Qi and Karma could
be used to implement a protocol stack.  Karma would serialize some
"send" data structure into some formatted stream and send it to
another machine which would then use qi to read the formatted stream
in construct a "received" data structure.  Then, the semantic actions
in the qi grammar would process the "received" data structure into a
"send" data structure, and then use karma to serialize that and send
it back to the other machine.

Of course I've *very* little experience in protocols, but the asio
people:

http://www.boost.org/doc/libs/1_56_0/doc/html/boost_asio.html

would know much more.  Also, the spirit people would know if this idea
is *remotely* feasible.

Good luck.  I'd love to see how this could be done with Qi and Karma.

> Any right directions is highly appreciated.
>
> Ramakrishnananda Karidas
>
[snip]



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Protocol implementation boost

teajay-2
In reply to this post by RAM.KARIDAS 拉姆
I've already used spirit to parse some text based protocols, so I guess it can do the job. How well it fits your particular problem, is really up to you. Try it on a small part of the protocol you want to implement, you will rapidly get a good feel if it's the right way to go or not.

Regards,

Thomas Bernard

Le 02/10/2014 08:36, RAM.KARIDAS 拉姆 a écrit :

    I am new here, I am looking for an example for protocol implementation through boost spirit.

I would like to know if Boost spirit is better to use in following case.

 

    Implement protocols stacks for in-house built PLCs and variety of hardware

    e devices used automation industry. Different hard ware support different

     protocols like mobbus, Modbus tcp/IP. We use c++. We are yet to implement CANopen,   EitherNET/IP, EitherCAT. The current communication module uses old method

s programming. They use unsigned Char, some classes structure, and use long switch cases and complex if statements to send/receive packets from PLC device. The whole structure seems complex, very long linear and there is repetitive code.

 

 

    Any right directions is highly appreciated.

   

 

 

Ramakrishnananda Karidas

 

 

*************************************************************************
This email message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message. [Delta Electronics, INC. Taiwan]
*************************************************************************


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk


_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Protocol implementation boost

RAM.KARIDAS 拉姆
In reply to this post by cppljevans
Thank you for formatting and answer. My first mail to mailing list bounced back to me with bad format. I could edit some of it.
Any way I one of the stack exchange groups I saw a suggestion Boost spirit is good for such purpose. Was curious if there are any example of implementation. Even most simple protocol.
I just need the flow and know it can be done.

-----Original Message-----
From: Larry Evans [mailto:[hidden email]]
Sent: Friday, October 03, 2014 1:14 AM
To: [hidden email]
Subject: Re: [Spirit-general] Protocol implementation boost

On 10/02/2014 01:36 AM, RAM.KARIDAS 拉姆 wrote:

Hi Ramakrishnananda,

In the following quote of your post, some corrections were made (which I hope are correct) and some reformatting done to make it easier to read.  Sorry if I made some mistakes :)

> I am new here, I am looking for an example for protocol implementation
> through boost spirit.  I would like to know if Boost spirit is better
> to use in following case.

>   Implement protocols stacks for in-house built PLCs and variety of
>   hardware devices used in automation industry. These hardware
>   devices support different protocols like mobbus, Modbus tcp/IP. We
>   use c++. We have yet to implement CANopen, EitherNET/IP, and
>   EitherCAT. The current communication module uses old methods of
>   programming. They use unsigned Char, some classes structure, and
>   use long switch cases and complex if statements to send/receive
>   packets from PLC device. The whole structure seems complex, very
>   long linear and there is repetitive code.

I've long thought that *maybe* the combination of Qi and Karma could be used to implement a protocol stack.  Karma would serialize some "send" data structure into some formatted stream and send it to another machine which would then use qi to read the formatted stream in construct a "received" data structure.  Then, the semantic actions in the qi grammar would process the "received" data structure into a "send" data structure, and then use karma to serialize that and send it back to the other machine.

Of course I've *very* little experience in protocols, but the asio
people:

http://www.boost.org/doc/libs/1_56_0/doc/html/boost_asio.html

would know much more.  Also, the spirit people would know if this idea is *remotely* feasible.

Good luck.  I'd love to see how this could be done with Qi and Karma.

> Any right directions is highly appreciated.
>
> Ramakrishnananda Karidas
>
[snip]



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general

*************************************************************************
This email message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message. [Delta Electronics, INC. Taiwan]
*************************************************************************
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Protocol implementation boost

RAM.KARIDAS 拉姆
In reply to this post by teajay-2

Thanks Thomas.

 

From: teajay [mailto:[hidden email]]
Sent: Friday, October 03, 2014 3:41 AM
To: [hidden email]
Subject: Re: [Spirit-general] Protocol implementation boost

 

I've already used spirit to parse some text based protocols, so I guess it can do the job. How well it fits your particular problem, is really up to you. Try it on a small part of the protocol you want to implement, you will rapidly get a good feel if it's the right way to go or not.

Regards,

Thomas Bernard

Le 02/10/2014 08:36, RAM.KARIDAS 拉姆 a écrit :

    I am new here, I am looking for an example for protocol implementation through boost spirit.

I would like to know if Boost spirit is better to use in following case.

 

    Implement protocols stacks for in-house built PLCs and variety of hardware

    e devices used automation industry. Different hard ware support different

     protocols like mobbus, Modbus tcp/IP. We use c++. We are yet to implement CANopen,   EitherNET/IP, EitherCAT. The current communication module uses old method

s programming. They use unsigned Char, some classes structure, and use long switch cases and complex if statements to send/receive packets from PLC device. The whole structure seems complex, very long linear and there is repetitive code.

 

 

    Any right directions is highly appreciated.

   

 

 

Ramakrishnananda Karidas

 

 

*************************************************************************
This email message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message. [Delta Electronics, INC. Taiwan]
*************************************************************************




------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk




_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general

 

*************************************************************************
This email message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message. [Delta Electronics, INC. Taiwan]
*************************************************************************

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general