Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6372939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:18:06+00:00 2026-05-25T01:18:06+00:00

I am currently working on a control system for Arduino type devices using Twisted,and

  • 0

I am currently working on a control system for Arduino type devices using Twisted,and have a bit of a design issue

Here is how things are currently: (sorry in advance, might be a bit long)

  1. to handle different type of devices (each having a different firmware & communication protocol ) i have a designed a “driver” system :
    • each driver is made of :
      • a “hardware handler class” : a wrapper around Twsited’s serial class with a few added helper methods
      • a custom serial protocol

2- While implementing drivers for Reprap 3d printers (also based on arduino, also using a serial connection) with rather specific protocols (ie enqueue point, set temperature etc), i have started to wonder if i am placing the methods for handling those features (each having specific commands) in the right place..

This all leads me to my questions:

I am not quite sure about the good practices as far as twisted protocols go , but having looked through the documentation / code of quite a few of them, it seems they tend to have relatively few methods

  • is this always the case? should the protocol only be used for very low level functions and in/out formatting and communication ?
  • certain devices i want to manage have very clearly defined protocols (Makerbot etc), should i consider general protocol specifications to be a different thing then the actual Twisted protocol classes i am creating ?

Any advice, tips and pointers are more than welcome !
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:18:07+00:00Added an answer on May 25, 2026 at 1:18 am

    I’ll try my best at answering a, well, quite general question.

    1) The interface that make up a Twisted protocol has only 4 methods:
    http://twistedmatrix.com/documents/11.0.0/api/twisted.internet.interfaces.IProtocol.html
    So this will be where all the interaction between your protocol implementations and Twisted happens.

    2) Besides instances of protocol, there is of course the factory which produces instances of your protocol (for each new connection). So for example, stuff that should be available to all connections (like i.e. current number of connected clients, whatever) naturally resides there.

    3) Of course it might make sense to build small class hierarchies, where you derive from Protocol, implement stuff that is shared by all your subprotocols, and then only implement the subprotocol specifics again in a derived class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I am working on a new version control system as part of a
Currently, I have this version of the autocomplete control working when returning XML from
I'm currently working on a legacy system using Oracle's ADF Faces JSF implementation for
I'm currently working on integrating the TFS source control system at my work ...
I am currently working on a server control for other applications in our company
I am currently working within a WPF user control (the root element of my
I'm currently working on a project with TFS source control. We've just gotten in
I currently working on an issue tracker for my company to help them keep
I'm creating a game, and am currently working on the Inventory system for it.
Currently I am working with a embedded system that has the Linux OS. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.