labgrid.protocol package

Submodules

labgrid.protocol.bootstrapprotocol module

class labgrid.protocol.bootstrapprotocol.BootstrapProtocol[source]

Bases: abc.ABC

load(filename: str)[source]

labgrid.protocol.commandprotocol module

class labgrid.protocol.commandprotocol.CommandProtocol[source]

Bases: abc.ABC

Abstract class for the CommandProtocol

run(command: str)[source]

Run a command

run_check(command: str)[source]

Run a command, return str if succesful, ExecutionError otherwise

get_status()[source]

Get status of the Driver

wait_for()[source]

Wait for a shell command to return with the specified output

labgrid.protocol.consoleprotocol module

class labgrid.protocol.consoleprotocol.ConsoleProtocol[source]

Bases: abc.ABC

Abstract class for the ConsoleProtocol

read()[source]

Read data from underlying port

write(data: bytes)[source]

Write data to underlying port

sendline(line: str)[source]
sendcontrol(char: str)[source]
expect(pattern: str)[source]
class Client[source]

Bases: abc.ABC

get_console_matches()[source]
notify_console_match(pattern, match)[source]

labgrid.protocol.digitaloutputprotocol module

class labgrid.protocol.digitaloutputprotocol.DigitalOutputProtocol[source]

Bases: abc.ABC

Abstract class providing the OneWireProtocol interface

get()[source]

Implementations should return the status of the OneWirePort.

set(status)[source]

Implementations should set the status of the OneWirePort

labgrid.protocol.filesystemprotocol module

class labgrid.protocol.filesystemprotocol.FileSystemProtocol[source]

Bases: abc.ABC

read(filename: str)[source]
write(filename: str, data: bytes, append: bool)[source]

labgrid.protocol.filetransferprotocol module

class labgrid.protocol.filetransferprotocol.FileTransferProtocol[source]

Bases: abc.ABC

put(filename: str, remotepath: str)[source]
get(filename: str, destination: str)[source]

labgrid.protocol.infoprotocol module

class labgrid.protocol.infoprotocol.InfoProtocol[source]

Bases: abc.ABC

Abstract class providing the InfoProtocol interface

get_ip(interface: str = 'eth0')[source]

Implementations should return the IP-adress for the supplied interface.

get_hostname()[source]

Implementations should return the hostname for the supplied interface.

get_service_status(service)[source]

Implementations should return the status of a service

labgrid.protocol.linuxbootprotocol module

class labgrid.protocol.linuxbootprotocol.LinuxBootProtocol[source]

Bases: abc.ABC

boot(name: str)[source]
await_boot()[source]

labgrid.protocol.mmioprotocol module

class labgrid.protocol.mmioprotocol.MMIOProtocol[source]

Bases: abc.ABC

read(address: int, size: int, count: int) → bytes[source]
write(address: int, size: int, data: bytes) → None[source]

labgrid.protocol.powerprotocol module

class labgrid.protocol.powerprotocol.PowerProtocol[source]

Bases: abc.ABC

on()[source]
off()[source]
cycle()[source]