TinyOS | final project for my CST352-Operating Systems class

 by   shanselman C# Version: Current License: BSD-2-Clause

kandi X-RAY | TinyOS Summary

kandi X-RAY | TinyOS Summary

TinyOS is a C# library. TinyOS has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This was the final project for my CST352-Operating Systems class at OIT (Oregon Institute of Technology). The requirements, exactly as they were given to me by the teacher, are in originalassignment.md. The goal of this project was to write a small virtual operating system for an abstract machine that provides a number of basic OS-like services like:. This is a cute, fun, interesting and completely useless thing. So, don't get your hopes up that you'll get actual work done with it. ­. It's neat however, as it is a study on how I solved a particular problem (this assignment) given a 10 week semester. I was the only student to use C#, and I finished it in 4 weeks, leaving 6 weeks to chill and watch the other students using Java and C++ do their thing. It's also ironic because I used a high-level OO language like C# to deal with a minute concept like an "Operating System" the might have 256 bytes (bytes, not Kbytes) of memory. During this process I exercised a good and interesting chunk of the C# language and the .NET Framework. There are some very silly things like the OS's implementation of virtual memory swapping out memory pages as XML. I might take an array of 4 bytes and make an XML file to help them. I hope the irony isn't lost on you. I also commented all the C# with XML and built an ndoc MSDN style help file. So, you might just use this as a learning tool and a pile of sample code. One Note: I'm an ok programmer, but understand that I whipped this out in several 3am coding sessions, as well as during lectures in class. This is NOT fabulous code, and should be looked upon as interesting, not gospel. I'm sure I've done some very clever things in it, and for each clever thing, there's n stupid things. I'll leave the repair of these stupid things as an exercise to the reader.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              TinyOS has a low active ecosystem.
              It has 286 star(s) with 55 fork(s). There are 15 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 4 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of TinyOS is current.

            kandi-Quality Quality

              TinyOS has 0 bugs and 0 code smells.

            kandi-Security Security

              TinyOS has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              TinyOS code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              TinyOS is licensed under the BSD-2-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              TinyOS releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TinyOS
            Get all kandi verified functions for this library.

            TinyOS Key Features

            No Key Features are available at this moment for TinyOS.

            TinyOS Examples and Code Snippets

            No Code Snippets are available at this moment for TinyOS.

            Community Discussions

            QUESTION

            How to connect LED's in nesC?
            Asked 2019-Apr-15 at 19:17

            I am trying to understand how nesC's modules, configurations, interfaces, and components work. To do this I have tried to implement a very simple application; when its done booting up, it should turn on its three LED's to show its ID. But I get the error:

            ...

            ANSWER

            Answered 2019-Apr-15 at 19:17

            The error says that CoolLedM uses interface Leds, but the interface isn't connected to any implementation. Let's look at AppC.nc:

            Source https://stackoverflow.com/questions/55687906

            QUESTION

            Unable to compile TinyOs applications with avr-gcc 4.2.1 but able to compile with avr-gcc 3.3
            Asked 2019-Apr-09 at 06:44

            i'm trying to compile TinyOs 1.x applications on my cygwin machine. I'm able to compile the applications of TinyOs 1.x using avr-gcc v3.3 but not with v4.2.1.

            I wanted to upgrade my avr-gcc from v3.3 to v4.2.1 as there are support for new controllers. So i followed the steps that were provided to build the toolchains.

            https://www.microchip.com/webdoc/AVRLibcReferenceManual/install_tools_1install_avr_binutils.html

            I have used : binutils-2.17, gcc-4.2-20070719 , avr-libc-1.8.1 to build my toolchain. I choose this versions because it is the base version for the new mcu's support.

            Now when i try to compile the TinyOs applications using v4.2.1 , i'm stuck at the errors like this. Error Given while compiling with avr-gcc v4.2.1

            Working with avr-gcc v3.3

            And For v3.3 : binutils-2.13, gcc-3.3 , avr-libc-20030512.

            and additionally : nesc-1.1-1w.cygwin.i386.rpm, tinyos-1.1.0-1.cygwin.noarch.rpm, tinyos-tools-1.1.0-1.cygwin.i386.rpm, galsc-0.1.0-1.cygwin.i386.rpm were installed for both the versions of avr-gcc.

            How can i fix this error ? If more information needed, feel free to ask. Thank you in advance .

            ...

            ANSWER

            Answered 2019-Apr-09 at 06:44

            I added the new controllers to the the current gcc toochain.

            I added the architectures to the my current toolchain. I have answered it here.

            Adding a architecture to the base toolchain

            Source https://stackoverflow.com/questions/54880199

            QUESTION

            How to fix an error : 'Could not load library 'toscomm': no toscomm in java.library.path'?
            Asked 2019-Mar-23 at 14:46

            I am getting familiar with Tiny OS enviroment, currently I am at lesson 4 "Mote-PC serial communication and SerialForwarder" and I am stuck with the part where I have to listen to serial port for any incoming data. I am trying to implement a simple example where I need to use TestSerial script to listen for any incoming messages however when I run

            ...

            ANSWER

            Answered 2019-Mar-23 at 14:46

            I do not think your issue is with toscomm, as long as the library ends up being loaded successfully you should not be getting any issues. I always used to get the same exception that you are seeing being thrown over there everytime I used the serial but never bothered to fix it as it didn't really hamper the operation of the serial port.

            In the end, I got rid of the exception by copying libtoscomm from the {TOS_ROOT}/tools/tinyos/java/serial/ directory to one of the directories that TinyOS is looking for libraries in. In your case you would put a copy of the libtoscomm file in one of the directories /usr/java/packages/lib/i386 , /lib or /usr/lib.

            You can try doing that and seeing if that resolves the exception issue for you.

            What I suspect might be causing your issue is that you do not have TestSerialAppC loaded onto you mote and connected to the serial port. Have you made sure the mote is connected to the serial port?

            I loaded ran the application on a mote and got the output below, so the issue is not with TestSerialAppC

            Source https://stackoverflow.com/questions/55306927

            QUESTION

            using java to read data from serial port in Tiny OS
            Asked 2019-Mar-20 at 13:30

            I am going through Tiny OS tutorial lesson number 4 "Mote-PC serial communication and SerialForwarder" and I am stuck on the line where it says "Once you have installed TestSerial, you need to run the corresponding Java application that communicates with it over the serial port. This is built when you build the TinyOS application. From in the application directory, type

            ...

            ANSWER

            Answered 2019-Mar-20 at 13:30

            You must have skipped the step when you had to run the make command.

            Navigate to the apps/tests/TestSerial folder and type make [platform] (such as make telosb, make iris e.t.c), the makefile that will be run will be the makefile in the TestSerial folder which is defined as follows:

            Source https://stackoverflow.com/questions/55252098

            QUESTION

            TinyOS UDP support?
            Asked 2018-Dec-05 at 15:28

            Does TinyOS provide support for the UDP protocol ?

            We are trying to create an IP Phone using a Micro-controller and were thinking of installing TinyOS on it.

            Any help is appreciated!

            ...

            ANSWER

            Answered 2018-Dec-05 at 15:28

            TinyOS has an IP stack (6lowPan) called BLIP which supports UDP and TCP although I have never used BLIP personally. See the link HERE for more information. A good point to start would be to look at the UDP-echo application in apps folder of the TinyOS distribution.

            Source https://stackoverflow.com/questions/53627361

            QUESTION

            How to fire a onshot timer multiple times in TinyOs?
            Asked 2018-Sep-23 at 14:30

            I am trying to write a simple program in TinyOS to implement 2 timers, one a periodic timer, and the other a oneshot timer. The periodic timer has to fire every 2 seconds and the oneshot timer should fire at 5th, 7th and 9th second respectively. I have written the program, but the oneshot timer doesn't work. Please help me find the issue.

            ...

            ANSWER

            Answered 2018-Sep-23 at 14:30

            You're only supposed to call startOneShot once on a timer - you should only call startOneShot again on the same timer after it has fired. I would suggest either using 3 separate timers for your one shots, or call startOneShot(5 seconds) on boot, then when it fires, call startOneShot again for 2 seconds, then a third time. Use a counter to keep track of how many times it has fired.

            Source https://stackoverflow.com/questions/52466818

            QUESTION

            What does it mean that footprint/core OS is 400 bytes?
            Asked 2018-Mar-09 at 08:32

            I am researching TinyOS for a school assignment and read that the "core OS is 400 bytes", and another source saying "The footprint of TinyOS is 400 bytes" What exactly does this mean? Is it the actual space it occupies on harddrive? How big ia a "traditional" OS such as windows?

            The answers I have found of what "footprint" actually means is confusing too. Because it seems to mean both actual physical space and memory/disk space.

            ...

            ANSWER

            Answered 2018-Mar-09 at 08:32

            Just to explain a bit of background, the authors of TinyOS themselves have explained that TinyOS isn't really an operating system:

            TinyOS has a component-based programming model, codified by the nesC language, a dialect of C. TinyOS is not an OS in the traditional sense; it is a programming framework for embedded systems and set of components that enable building an application-specific OS into each application. A typical application is about 15K in size, of which the base OS is about 400 bytes; the largest application, a database-like query system, is about 64K bytes.

            TinyOS is a software build system designed to allow software engineers to more easily build software for really tiny devices (like this wireless sensor), which do not have a harddrive. Instead, the program is typically stored inside the microcontroller of the device - the device I linked to for example has 48k bytes of flash memory (small embedded devices like these often use flash memory to store their program). 48k of code isn't very much, so it's really important that when you're making software to load onto the device, it takes up as little space as possible.

            So, the 'base footprint of 400 bytes' means that, on top of the code that you (the software engineer) write to do whatever your tiny device needs to do, the TinyOS framework (which supports and provides services for your code) only adds an extra 400 bytes (which is really amazing!) to your program code which will actually be loaded onto the device's flash memory. However, this isn't the only overhead - depending on the device, TinyOS may also include various different supporting drivers for whatever chips and components exist on that device.

            See figure 6 in this paper for some examples of actual program sizes.

            Because of this I have found that building the same application for different devices using TinyOS can yield very different results. For example if I build a really simple program for the MicaZ wireless sensor I get:

            Source https://stackoverflow.com/questions/49181909

            QUESTION

            how to disassebled binary with source line and file name using gcc-linaro-arm-linux-gnueabihf-objdump?
            Asked 2018-Jan-09 at 14:26

            I want to get the disassebled binary files with source line and file name. I have added option -g as a compilation option,following is the setting in cmake files.

            ...

            ANSWER

            Answered 2018-Jan-09 at 14:26
            SET(CMAKE_CXX_FLAGS "-std=c++11 -s -g")
            

            Source https://stackoverflow.com/questions/48163313

            QUESTION

            What's the exact meaning of uint8_t in TinyOS?
            Asked 2017-Aug-03 at 12:24

            everyone! I'm trying to become familiar with TinyOS. I'd like to know the difference between uint8_t and uint16_t.

            Thank you in advance :-)

            ...

            ANSWER

            Answered 2017-Aug-03 at 12:24

            Just for the sake of thoroughness:

            Data types come in many shapes and sizes. The two you are referring to are of types unsigned 8 bit integer and unsigned 16 bit integer.

            An integer is a whole number that can be positive or negative; however, in the case of types an unsigned integer can only be positive as it does not designate space for a sign (i.e. a negative sign). 8 bit and 16 bit refer to the amount of space the integer takes up in memory. An unsigned 8 bit integer's values can be 0 - 255 while an unsigned 16 bit integer can hold values from 0 - 65,535 (Side note: If you are familiar with networking you may notice that 65,535 is the largest port number possible. This is due to the fact a port number is an unsigned 16 bit integer.)

            Hope this helps.

            Source https://stackoverflow.com/questions/45481877

            QUESTION

            TinyOS event return type meaning
            Asked 2017-Feb-15 at 16:53

            So in TinyOS an interface is composed of commands and events. When a module uses an interface, it calls its commands and provides an implementation of its events (provides an event handler).

            The sense of the return type of a command is clear, it is the same as that of any function/method in any programming language, but, the return type of an event results unclear to me.

            Let's take an example:

            ...

            ANSWER

            Answered 2017-Feb-15 at 16:53

            The value is unspecified or this code may even not compile.

            In TinyOS, there's a concept of combine functions, which are of signature type f(type, type) and their purpose is to reasonably combine two values of the same type. For error_t there's such a function defined:

            Source https://stackoverflow.com/questions/42231622

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install TinyOS

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/shanselman/TinyOS.git

          • CLI

            gh repo clone shanselman/TinyOS

          • sshUrl

            git@github.com:shanselman/TinyOS.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link