blob: ae63969782f18d19a934eeed360826d25142f69c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from glob import glob
from odoo.addons.hw_drivers.interface import Interface
class SerialInterface(Interface):
connection_type = 'serial'
def get_devices(self):
serial_devices = {}
for identifier in glob('/dev/serial/by-path/*'):
serial_devices[identifier] = {
'identifier': identifier
}
return serial_devices
|