Categories
Tools

Working with device drivers

Quflow example: Using a phone modem by defining a simple driver on-the-fly.
[python]
>>> from quflow import enter, exit, Driver, ports, sleep
>>> class Phone(Driver):
… commands = dict(attention = “AT”, call = “ATD%s”, hangup = “H0”)
… events = dict(ok = “OK”)
… procedures = dict(enter = “attention(), ok()”)
… expectEcho = True

>>> phonePort = ports()[2] # Assuming the third port controls the phone.
>>> phone = Phone(phonePort, timeout = 25)
>>> me = “+123456789” # My phone number – a global variable.
>>> enter(phone) # Beginning command-oriented usage.
Entering Phone(‘ASRL5::INSTR’)
Executing ‘attention(), ok()’ % ()
ASRL5::INSTR> AT
ASRL5::INSTR< AT
ASRL5::INSTR< OK
>>> # Items defined now affect only the phone object.
>>> procedure(trick = “call(‘%s’), sleep(15), no_carrier(), hangup()”)
>>> trick(me)
Executing “call(‘%s’), sleep(15), no_carrier(), hangup()” % (‘+123456789’,)
ASRL5::INSTR> ATD+123456789
ASRL5::INSTR< ATD+123456789
ASRL5::INSTR< NO CARRIER
ASRL5::INSTR> H0
ASRL5::INSTR< H0
>>> exit(phone) # Ending command-oriented usage.
Exiting Phone(‘ASRL5::INSTR’)
>>>
[/python]

Categories
Examples Tools

Interoperability

Working with multiple connected systems is complicated in other tools and therefore often not prioritized, leading to poor interoperability and user complaints. With quflow, interoperability testing is much easier:

1. Start a server for workspaces on one system. In this example the server publishes a phone (‘serverPhone=phone’) and its protocol on all workspaces so that other devices can use it during experiments.

[python]
>>> from quflow import Driver, Workspaces
>>> protocol = dict(
… commands = dict(
… attention="AT",call="ATD%s", answer="H1", hangup="H0"),
… events = dict(
… ok="OK", receiving="INCOMING CALL %s",
… connected="CONNECTED", disconnected="DISCONNECTED"),
… expectEcho = True)
>>> phone = Driver("COM5", number="+17654321", ** protocol)
>>> workspaces = Workspaces(protocol = protocol, serverPhone = phone)
Service spiro://:9091/<workspace> started.
>>>
[/python]

2. Control the experiment from a client system. In this case one that is connected to another phone on COM7. The printouts show communication to and from the COM ports (using their VISA resource name equivalents) when a test scenario is created and tested. Printouts in brackets indicate messages that are pending – these are programmed into the scenario as events on the line after.

[python highlight=”29″]
>>> from quflow import Driver, Workspace, enter, exit
>>> call_test = Workspace(‘localhost/call_1’)
>>> myPhone = Driver("COM7", number = ‘+12345678’, ** call_test.protocol)
>>> enter(call_test) # start a manual experiment
>>> myPhone.call(serverPhone.number)
ASRL7::INSTR> ATD+17654321
ASRL7::INSTR< ATD+17654321
(ASRL5::INSTR< INCOMING CALL +12345678)
>>> serverPhone.receiving(myPhone.number)
ASRL5::INSTR< INCOMING CALL +12345678
>>> serverPhone.answer()
ASRL5::INSTR> H1
ASRL5::INSTR< H1
(ASRL5::INSTR< CONNECTED)
(ASRL7::INSTR< CONNECTED)
>>> serverPhone.connected() and myPhone.connected()
ASRL5::INSTR< CONNECTED
ASRL7::INSTR< CONNECTED
>>> serverPhone.hangup() and myPhone.hangup()
ASRL5::INSTR> H0
ASRL5::INSTR< H0
ASRL7::INSTR> H0
ASRL7::INSTR< H0
(ASRL5::INSTR< DISCONNECTED)
(ASRL7::INSTR< DISCONNECTED)
>>> serverPhone.disconnected() and myPhone.disconnected()
ASRL5::INSTR< DISCONNECTED
ASRL7::INSTR< DISCONNECTED
>>> verdict("OK – myPhone *could* initiate a call with serverPhone")
VERDICT: OK – myPhone *could* initiate a call with serverPhone.
>>> exit(call_test) # finish the experiment
>>>
[/python]

The highlighted verdict line above is automatically converted into a static test purpose (where “OK – (dut) *could* (action)” becomes “Can (dut) (action)?”) and a dynamic test status that depends on the outcome of the latest run (“OK – (dut) *could* (action).” or “FAIL – (dut) *could not* (action).”). To make it re-run after an inconclusive failure, catch the bad situation once:

[python]
>>> call_test() # Re-run the test
TEST: Can myPhone initiate a call with serverPhone?
ASRL7::INSTR> ATD+17654321
ASRL7::INSTR< ATD+17654321
(ASRL7::INSTR< BUSY)
VERDICT: FAIL – myPhone *could not* initiate a call with serverPhone.
REASON: (‘ASRL7::INSTR< BUSY’) when expecting ‘ASRL5::INSTR< CONNECTED’ and ‘ASRL7::INSTR< CONNECTED’.
‘FAIL – myPhone *could not* initiate a call with serverPhone.’
>>> call_test("ServerPhone was buzy – trying again")
STATUS: ServerPhone was buzy – trying again.
TEST: Can myPhone initiate a call with serverPhone?
ASRL3::INSTR> ATD+17654321
ASRL3::INSTR< ATD+17654321
ASRL5::INSTR< INCOMING CALL +12345678
ASRL5::INSTR> H1
ASRL5::INSTR< H1
ASRL5::INSTR< CONNECTED
ASRL3::INSTR< CONNECTED
ASRL5::INSTR> H0
ASRL5::INSTR< H0
ASRL3::INSTR> H0
ASRL3::INSTR< H0
ASRL5::INSTR< DISCONNECTED
ASRL3::INSTR< DISCONNECTED
VERDICT: OK – myPhone *could* initiate a call with serverPhone.
‘OK – myPhone *could* initiate a call with serverPhone.’
>>>
[/python]

3. Run the experiment again, this time on the target system. If the target is a device tested in high volume production this is done in a separate thread within a pre-compiled boot script so that it consumes as little resources as possible and can run other tests in parallel, and with logging enabled so that any error messages can be used to document the reason for repair decisions and corrective actions.

[python]
>>> from quflow import Driver, Workspace
>>> from myplatform import myPhone
>>> call_test = Workspace(‘workspaces.myfactory.net/call_1’)
>>> call_test()
TEST: Can myPhone initiate a call with serverPhone?
ASRL3::INSTR> ATD+17654321
ASRL3::INSTR< ATD+17654321
ASRL5::INSTR< INCOMING CALL +12345678
ASRL5::INSTR> H1
ASRL5::INSTR< H1
ASRL5::INSTR< CONNECTED
ASRL3::INSTR< CONNECTED
ASRL5::INSTR> H0
ASRL5::INSTR< H0
ASRL3::INSTR> H0
ASRL3::INSTR< H0
ASRL5::INSTR< DISCONNECTED
ASRL3::INSTR< DISCONNECTED
VERDICT: OK – myPhone *could* initiate a call with serverPhone.
‘OK – myPhone *could* initiate a call with serverPhone.’
>>>
[/python]

Categories
Uncategorized

Public homepage now publi…

Public homepage now published at http://quflow.com – welcome to comment and to the wiki at http://quflow.com/explained !

Categories
Uncategorized

Rapid prototyping and verification

Quflow provides a rapid prototyping and verification environment where all intercomponent problem areas can be analyzed easily. This simplifies the industrialization process by enabling quick integration of new components while securing that user expectations and legal requirements are met. The Quflow environment can be used for modular development of all kinds of systems, and comes with free source code in Python. Example applications are included that use direct VISA communication or LabVIEW drivers to interface with the complete system under test.

Categories
Examples

Solving the difficult system integration problems

Integration of mobile technologies is becoming easier and faster every year. However, new problems arise and old problems occur again when devices are industrialized and tested in field. For instance, integrating a positioning sensor based on GPS/Glonass into a small device requires careful study of many aspects at the same time, such as:

  1. Environments: indoor/car/street/open air.
  2. Antenna: directivity pattern, band stability, noise rejection (in all use cases!).
  3. Electronics: noise parameters, thermal stability, clocking accuracy.
  4. Requirements: responsiveness, accuracy, energy consumption (in all environments!).

Although each separate component is working as expected, after their integration into a commercial product, the total system performance can easily fall outside specified product requirements and user expectations. Proper systems engineering skills such as making the most efficient product partitioningknowing what matters most during integration and understanding how to test the most important use-cases is even more crucial.

To make a successful product, each problem area needs to be understood in detail so that its design assumptions are quantifiable and the complete system design can be optimized well. Quflow helps small business/lean projects with the systems analysis, integration and industrialization needed to make the most successful mobile devices and new technologies.

Categories
Uncategorized

Welcome to Quflow!

Welcome!
Categories
Uncategorized

will during September-Dec…

will during September-December 2010 study energy-efficency and maturity of quantum electronic devices suitable for mobile devices

Categories
Uncategorized

meaning of Quflow: Qu as …

meaning of Quflow: Qu as in Qualification (i.e. meeting or exceeding expectations) – flow as in workflow (way of working)