Skip to content

Conversation

@Emantor
Copy link
Member

@Emantor Emantor commented Feb 27, 2017

Add onewire support to labgrid, needs a running onewire server at the moment.

WIP:

  • Convert to managedResource
  • Add to exporter
  • Test over network

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 48.363% when pulling a922b15 on Emantor:topic/onewire into 71c65b0 on labgrid-project:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 48.363% when pulling a922b15 on Emantor:topic/onewire into 71c65b0 on labgrid-project:master.

import abc


class OneWireProtocol(abc.ABC):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the protocol level, this should be more generic. Maybe call it DigitalOutput instead?


@target_factory.reg_driver
@attr.s
class OneWireDriver(Driver):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corresponding to the change to the Protocol, this should be a OneWirePIODriver, implementing the DigitalOutput protocol.


@target_factory.reg_driver
@attr.s
class OneWirePowerDriver(Driver, PowerProtocol):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be called DigitalOutputPowerDriver.

@attr.s
class OneWirePort(Resource):
portname = attr.ib(validator=attr.validators.instance_of(str))
url = attr.ib(validator=attr.validators.instance_of(str))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be called OneWirePIO and have host and path properties. Also add a docstring giving an example path.

@Emantor Emantor force-pushed the topic/onewire branch 8 times, most recently from 35a3e22 to 1417ad0 Compare March 1, 2017 17:25
@coveralls
Copy link

coveralls commented Mar 1, 2017

Coverage Status

Coverage increased (+0.7%) to 49.248% when pulling 1417ad0 on Emantor:topic/onewire into b163bce on labgrid-project:master.

@coveralls
Copy link

coveralls commented Mar 1, 2017

Coverage Status

Coverage increased (+0.7%) to 49.248% when pulling 1417ad0 on Emantor:topic/onewire into b163bce on labgrid-project:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 49.248% when pulling 6f624fa on Emantor:topic/onewire into b163bce on labgrid-project:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 49.248% when pulling 6f624fa on Emantor:topic/onewire into b163bce on labgrid-project:master.

@Emantor Emantor force-pushed the topic/onewire branch 2 times, most recently from 5c0dd91 to 7984b0d Compare March 2, 2017 07:28
@coveralls
Copy link

coveralls commented Mar 2, 2017

Coverage Status

Coverage increased (+0.7%) to 49.248% when pulling 7984b0d on Emantor:topic/onewire into b163bce on labgrid-project:master.

@Emantor Emantor force-pushed the topic/onewire branch 3 times, most recently from facdfa7 to 204c33a Compare March 2, 2017 09:56
@coveralls
Copy link

coveralls commented Mar 2, 2017

Coverage Status

Coverage increased (+1.0%) to 49.521% when pulling 204c33a on Emantor:topic/onewire into 24b0aaa on labgrid-project:master.

@Emantor
Copy link
Member Author

Emantor commented Mar 2, 2017

This should be ready for review now, removing WIP.

@Emantor Emantor changed the title [WIP] Topic/onewire [RDY] Topic/onewire Mar 2, 2017
@coveralls
Copy link

coveralls commented Mar 2, 2017

Coverage Status

Coverage increased (+0.6%) to 49.108% when pulling 204c33a on Emantor:topic/onewire into 24b0aaa on labgrid-project:master.

@Emantor Emantor requested a review from jluebbe March 2, 2017 10:27
@target_factory.reg_driver
@attr.s
class DigitalOutputPowerDriver(Driver, PowerProtocol):
"""NetworkPowerDriver - Driver using a networked power switch to control a target's power"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the docstring.

@attr.s
class DigitalOutputPowerDriver(Driver, PowerProtocol):
"""NetworkPowerDriver - Driver using a networked power switch to control a target's power"""
bindings = {"onewire": OneWirePIODriver, }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this bind to a DigitalOutputProtocol? Maybe use "output" as the name.


@target_factory.reg_resource
@attr.s
class OneWirePIO(Resource):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a docstring with example host/port values.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 49.108% when pulling a85fa12 on Emantor:topic/onewire into 93eaaa6 on labgrid-project:master.

Emantor added 8 commits March 2, 2017 12:43
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
@coveralls
Copy link

coveralls commented Mar 2, 2017

Coverage Status

Coverage increased (+0.7%) to 49.234% when pulling 18957f5 on Emantor:topic/onewire into 1b8a649 on labgrid-project:master.

@jluebbe jluebbe merged commit ded90bb into labgrid-project:master Mar 2, 2017
@Emantor Emantor deleted the topic/onewire branch March 21, 2017 11:28
benjamin1313 pushed a commit to benjamin1313/labgrid that referenced this pull request Feb 19, 2025
remote/client: support token with template RemotePlace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants