Code Monkey home page Code Monkey logo

surefire's People

Contributors

stefandebruyn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

surefire's Issues

CLI tool is implemented poorly

The code has a lot of boilerplate. Adding/editing commands requires changes in multiple files.

Rewrite the CLI tool to be more modular. This is probably best accomplished with commands as objects. While we're at it, add better command-specific help messages, like when entering a command with no arguments (e.g., sm check).

Arduino PSL `Socket` can send but not receive UDP packets

Manual testing of Socket on Arduino showed that a PC received UDP packets emitted by the Arduino, but not vice versa (Socket::recv would block forever). It is unknown if this is a problem with the Arduino PSL Socket implementation or something else, like the Arduino itself (Mega 2560 with an Ethernet Shield 2; other Arduinos were not tried).

Split methods for PAL objects into wrapper and implementation methods

Split each PAL object method into a public wrapper (that the PAL implements) and a private implementation method (that the PSL implements). This cuts down on boilerplate, as the wrapper can contain common code that gets "inherited" by all PSL implementations of a particular PAL method; for example, checking that the object is initialized:

// Before
Result foo() // Implemented in PSL
{
    if (!mInit) // Copied across all PSL implementations
    {
        return E_FOO_UNINIT;
    }
    ...
}

// After
Result foo() // Implemented in PAL
{
    if (!mInit)
    {
        return E_FOO_UNINIT;
    }
    return this->fooImpl();
}

Result fooImpl() // Implemented in PSL
{
    ...
}

`StateVectorAutocoder` does not acknowledge the `lock` config option

A StateVector can be made thread-safe by specifying the lock option in the config file:

[options]
lock
...

StateVectorCompiler acknowledges this option and creates a lock for the state vector, but StateVectorAutocoder does not; the autocoded state vector will not be thread-safe. Fix this.

Finish `RegionRxTask` and `RegionTxTask`

The dev branch has unfinished Core Library tasks called RegionRxTask and RegionTxTask for performing network I/O using state vector regions as packets. The logic is mostly there, they just need testing.

Finish RegionRxTask and RegionTxTask and merge them into master.

Allow getting of `StateVector` region spanning the entire vector

A Region spanning an entire state vector has a variety of uses such as:

  • Logging/telemetering
  • Saving the application state to a file so that it can be restored after an application restart

One possible approach: a well-known value (like maybe "" or nullptr) that can be passed to StateVector::getRegion to get this region.

Add unit tests for `StateVector` thread safety

StateVectors may optionally be configured with a lock for thread-safety, but this is currently not unit tested.

Create unit tests for this. Element and Region probably deserve their own thread safety tests as well.

Add error code logging utility to Core Library

It would be useful to have a utility for logging error codes. There are several things we might want to do with error codes:

  • Log them to the state vector or an output stream
  • Count them
  • Latch them (i.e., raise a flag when the error is first seen, and clear the flag when it ceases)

Evaluate which of these is most useful, if not all of them. Design and implement an error logging utility. Future work may also build error logging into other Core Library components like IExecutors.

Finish `DigitalIoTask` and `AnalogIoTask`

The dev branch has unfinished Core Library tasks called DigitalIoTask and AnalogIoTask for performing device I/O using the state vector. The logic is mostly there, they just need testing.

Finish DigitalIoTask and AnalogIoTask and merge them into master.

Finish `SpinExecutor`

The dev branch has an unfinished SpinExecutor class for executing a sequence of Tasks at a fixed rate. The logic is mostly there, it just needs testing.

Finish SpinExecutor and merge it into master.

Add `Task`s for network I/O with configurable packet formats

RegionRxTask and RegionTxTask (#11) use state vector regions as packet formats. It would be useful to support packet formats containing elements scattered around multiple regions.

Add Tasks that can serialize arbitrary sets of state vector elements and send/receive these across the network.

Achieve 100% test coverage

This may involve updating the build GitHub workflow to use LCOV instead of GCOV, so we can exclude certain untestable branches from the coverage report.

Make `init` factory methods non-static

Static factory methods don't make sense when the constructed object can be default-constructed to an uninitialized state. Non-static factory methods would be less obtuse:

// Before
Foo foo;
Foo::init(foo, ...);

// After
Foo foo;
foo.init(...);

Update all init methods to follow this pattern.

Allow setting initial element values in `StateVector` config files

Currently, StateVector config files only declare elements, and all elements initialize to 0.

Add the option of setting element initial values, e.g.,

I32 a
F64 b = 1.522

It would be neat if the RHS could be an arbitrary expression referencing any previously assigned elements.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.