Pytos Screenshots

From NESTFE Wiki

Jump to: navigation, search

Contents

Basic Pytos

You open a basic PyTOS shell by running the PytosShell.py script, as shown. You are then given the "app" variable which, when printed as shown below, tells you how many enums, types, and messages formats have been imported. It also tells you which nesC modules have RPC functions or RAM symbols available. You can print a particular module, as shown below, to see what rpc functions or variables it has. This module (RamSymbolsM) only has two rpc functions.

Image:pytosBasic.jpg

Enums, Types, and Message Formats

From the app variable, you can view the enums, message formats and AM types, or any arbitrary type declarations (such as TOS_Msg, which is a C structure, not a message format). In the example below, we first print a particular enum (drainConsts), then print a summary of all messages, then print a particular message format (DrainMsg), then print a particular type declaration (TOS_Msg).

Image:pytosStage1.jpg

Rpc and Ram Symbols

From a particular module name, you can print all available RPC functions or available RAM symbols. You can peek/poke (ie. get/set) the modules or call it's RPC functions and see the return values. In this case, OscilloscopeM has four variables and three RPC functions. We peek at the currentReading variable and call the stop function. (we made StdControl rpc-able, just for this example, by adding the "@rpc()" symbol after the interface declaration in OscilloscopM. the start/stop functions don't take any parameters.)

Image:pytosRpcRamSymb.jpg


Listen

Because PyTOS has complete information about the NesC application, it can automatically parse data packets from whatever application is running. In this example, it is parsing the oscopeMsg packets because we are running in the OscilloscopeRF directory (which we compiled with Pytos). The Listen.py tool has a number of different verbosity levels, and can show higher-level packet headers if desired.

Image:pytosListen.jpg

Personal tools