1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

Instrument: Add channel with ordered sequence

When add channel for power meter with specific order, it also imply the
order with corresponding fields in captured data. So later need read
back the index for channel and use it to reference power data.

So need use ordered dictionary object for channel.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
This commit is contained in:
Leo Yan 2016-01-05 15:01:18 +08:00
parent 47bf915b7c
commit 3229bb181a

View File

@ -14,6 +14,7 @@
# #
import csv import csv
import logging import logging
import collections
from devlib.utils.types import numeric from devlib.utils.types import numeric
@ -167,7 +168,7 @@ class Instrument(object):
def __init__(self, target): def __init__(self, target):
self.target = target self.target = target
self.logger = logging.getLogger(self.__class__.__name__) self.logger = logging.getLogger(self.__class__.__name__)
self.channels = {} self.channels = collections.OrderedDict()
self.active_channels = [] self.active_channels = []
# channel management # channel management