1class CrasOutputNode(object):
2    """Class representing an output node from ChromeOS Audio Server data.
3
4    An output node is a node that can play out audio, e.g. a headphone jack.
5    """
6
7    def __init__(self, node_id, node_type, node_name, volume, device_id,
8                 device_name):
9        self.node_id = node_id
10        self.node_type = node_type
11        self.node_name = node_name
12        self.volume = int(volume)
13        self.device_id = device_id
14        self.device_name = device_name
15
16    def __str__(self):
17        return ('Node id %s, Node name: %s, Device id: %s, Device name: %s '
18                'Volume: %d' % (self.node_id, self.node_name, self.device_id,
19                                self.device_name, self.volume))
20