 Aylmer sector and eastward towards the Buckingham and Masson-Angers sectors nearby Quebec Autoroute 50 as well as a link to Ottawa near Tunney's Pasture. According to the website, Lac-Beauchamp and Lorrain are the most likely stations to be built, which are located to the east of Labrosse.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Rapibus&oldid=955428024"//
//  NGCustomUnitControl.h
//  NGEngineControl
//
//  Created by <NAME> on 09.06.21.
//

#ifndef NGCustomUnitControl_h
#define NGCustomUnitControl_h

#if (ARDUINO >= 100)
#include <Arduino.h>
#else
#include <WProgram.h>
#endif

#include <NGCustomNotification.h>
#include <NGRealTimeClock.h>

#define NOADDRESS           0x00
#define REQUESTEDDATALENGTH 6

// Command structure
//
// 1. Byte - Subject
//  2. Byte - Operation
// 0x00     None
//  0x00        Nop
// 0x01     Engine
//  0x00        Nop
//  0x01        RunForward
//  0x02        RunBackward
//  0x03        Stop
//  0x04        SetSpeed
// 0x02     Joint
//  0x00        Nop
//  0x01        Move
//  0x02        Simulate
//  0x03        MoveStepToMax
//  0x04        MoveStepToMin
//  0x05        Read
// 0x03     Gripper
//  0x00        Nop
//  0x01        Grip
//  0x02        Release
//   3. Byte - Name
//    max. 9 Bytes + 1 Byte 0xFF as Separator

#define OBSERVEMEMORYDELAY 5000

#define NOTIFICATIONCOUNT 3

#define CMDOffset           2
#define MaxCMDLength        15
#define CMDNameSeparator    0xFF

#define CMDSubject  0
#define CMDSNone    0x00
#define CMDSEngine  0x01
#define CMDSJoint   0x02
#define CMDSGripper 0x03

#define CMDOperation          1
#define CMDONop               0x00

#define CMDOEngineRunForward  0x01
#define CMDOEngineRunBackward 0x02
#define CMDOEngineStop        0x03
#define CMDOEngineSetSpeed    0x04

#define CMDOJointMove           0x01
#define CMDOJointSimulate       0x02
#define CMDOJointMoveStepToMax  0x03
#define CMDOJointMoveStepToMin  0x04
#define CMDOJointRead           0x05

#define CMDOGripperGrip       0x01
#define CMDOGripperRelease    0x02
#define CMDOGripperSimulate   0x03

#define ExceptionUnknown                   1
#define ExceptionTooMuchNotificationCount 10

enum workMode { wmNone, wmObserveMemory, wmCommand, wmSpec };

class NGCustomUnitControl {

protected:
    char* _name;
    char* _version;
    byte _address = NOADDRESS;
    bool _initialized;
    bool _logging;
    int _serialRate;
    NGCustomNotification *_notification[NOTIFICATIONCOUNT];
    int _notificationCount = 0;
    byte _receivedData[MaxCMDLength];
    int _receivedDataCount = 0;
    bool _receivingData = false;
    byte _requestedData[REQUESTEDDATALENGTH];
    workMode _workMode = wmNone;
    int _exceptionCount = 0;
    int _pinStartup = -1;
    NGRealTimeClock *_rtc = nullptr;

    void _create(char* name, byte address, int serialRate);
    
    void _clearState();
    
    void _writeState();
    
    void _raiseException(int id);
    
    virtual void _processingReceivedData();
    
    virtual void _processingStartupLoop();

public:
    void initialize();
    
    long int startUp();
    
    void registerRealTimeClock(NGRealTimeClock *rtc);
    
    void registerNotification(NGCustomNotification *notification);
    
    void setWorkMode(workMode workmode);
    
    workMode getWorkMode();
    
    void registerStartup(int pinStartup);
    
    void processingLoop();
    
    void clearInfo();

    void writeInfo(char* info);

    void receiveDataStart();
    
    void receivedData(int index, byte data);
    
    void receiveDataFinish(int count);
    
    virtual void requestData(byte* data);
};

static NGCustomUnitControl *_globalUnit = NULL;

void setGlobalUnit(NGCustomUnitControl *unit);

bool hasGlobalUnit();

void globalUnitReceiveDataStart();

void globalUnitReceivedData(int index, byte data);

void globalUnitReceiveDataFinish(int count);

void globalUnitRequestData(byte* data);

#endif /* NGCustomUnitControl_h */
<filename>README.md
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/trycourier/courier-react/Test?label=Unit%20Tests)
[![stability-beta](https://img.shields.io/badge/stability-beta-33bbff.svg?label=Stability)](https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md#beta)
[![codecov](https://codecov.io/gh/trycourier/courier-react/branch/main/graph/badge.svg?token=NVTDWY9UH4)](https://codecov.io/gh/trycourier/courier-react)

## What is `courier-react`?

This repository, also called **In-App**, is a set of features and components that can work inside our customers websites. Courier is a powerful application but integrating all of the features into your frontend manually can be overwhelming and time consuming. This is where In-App steps up and can superpower your application by providing Realtime Messaging (Toast), an Inbox, Notification Preferences, and many more coming soon!

## Table of Contents

1. [Contributing](https://github.com/trycourier/courier-react/tree/main/CONTRIBUTING.md)
1. [Packages](#packages)

### Packages:

[components](https://github.com/trycourier/courier-react/tree/main/packages/components)

This package imports the other react components and bundles them up using `webpack` and `preact` to create a bundle that can be used to render all of our components in a frontend that does NOT use React.

---

[react-provider](https://github.com/trycourier/courier-react/tree/main/packages/react-provider)

This package exports a component called `CourierProvider` which creates a [context](https://reactjs.org/docs/context.html) object that is required for the following packages.

---

[react-toast](https://github.com/trycourier/courier-react/tree/main/packages/react-toast)

`Toast` is a non modal, component used to display brief, optional-expiring windows of information to a user. This can be integrated with a `push` provider or can be triggered manually.

---

[react-inbox](https://github.com/trycourier/courier-react/tree/main/packages/react-inbox)

`Inbox` is a component used to display a history of `read` and `unread` messages to a user. If we send a message to a user when they are not logged in, or if they didn't interact with the message before it disappeared, we also have an Inbox to show the history of messages received.

---

[types](https://github.com/trycourier/courier-react/tree/main/packages/types)

Utility package to share common Typescript types and interfaces shared between packages

---

[storybook](https://github.com/trycourier/courier-react/tree/main/packages/storybook)

Our development environment. This package depends on all the other packages and imports them into a storybook instance. This allows us to develop in an isolated environment.

---

---
In the first