BASIS 2 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Classes | Namespaces
alicat_basis2.hpp File Reference

ALICAT_BASIS2 driver: the one header to include. More...

#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <span>
#include <utility>
#include "alicat_basis2_ascii.hpp"
#include "alicat_basis2_detail.hpp"
#include "alicat_basis2_modbus.hpp"
#include "alicat_basis2_registers.hpp"
#include "alicat_basis2_request.hpp"
#include "alicat_basis2_types.hpp"
#include "alicat_basis2_uart_interface.hpp"
#include "alicat_basis2_version.h"
#include "../src/alicat_basis2.ipp"

Go to the source code of this file.

Classes

struct  alicat_basis2::ConfirmUnitIdChange
 Confirms ChangeUnitId(): the instrument answers to the new ID afterwards; connect one instrument only. More...
 
struct  alicat_basis2::ConfirmAddressChange
 Confirms SetModbusAddress(): the Modbus address changes at once. More...
 
struct  alicat_basis2::ConfirmBaudChange
 Confirms ChangeBaud(): the reply arrives at the new speed and the port must follow. More...
 
struct  alicat_basis2::ConfirmAbandonProtocol2
 Confirms SwitchToProtocol1(): the instrument leaves the protocol this driver speaks. More...
 
struct  alicat_basis2::ConfirmReturnToProtocol2
 Guard token of SwitchToProtocol2. More...
 
struct  alicat_basis2::ConfirmFactoryRestore
 Confirms FactoryRestore(): unit ID, baud rate, Modbus address and protocol revert; power cycle. More...
 
struct  alicat_basis2::UnitIdScan
 The unit IDs that answered a scan: bit 0 is A. More...
 
struct  alicat_basis2::AddressScan
 The Modbus addresses that answered a scan: bit n of byte n/8 is address n. More...
 
class  alicat_basis2::Basis2< Port >
 Driver for one instrument on a Bus. More...
 

Namespaces

namespace  alicat_basis2
 The ALICAT_BASIS2 driver: everything it declares lives here; internals in detail.
 

Detailed Description

ALICAT_BASIS2 driver: the one header to include.

alicat_basis2::Basis2<Port> drives one Alicat BASIS 2 mass flow meter (B series) or controller (BC series) through a Bus<Port> that owns the serial port. The driver speaks the instrument's ASCII protocol ("BASIS Protocol 2", the default) or Modbus RTU behind the same typed API. It has no platform code, allocates nothing, throws nothing, takes no lock and is not thread-safe: give each bus one owner, or guard it with one mutex.

Streaming mode is never started; broadcast (*) is never sent; there is no raw-text call. Six commands can strand the instrument (unit ID, Modbus address, baud rate, protocol switch, factory restore) and need a guard token naming the consequence.

Not verified on hardware: every reply format the manual does not show is an assumption with a knob (see docs/configuration.md).