61 lines
1.6 KiB
C
61 lines
1.6 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
/***********************************
|
|
rb2/regbus.h
|
|
|
|
RegisteredBus2
|
|
|
|
Paketorientierte Kommunikation via Serielle Verbindungen mit Adressierung
|
|
|
|
***********************************/
|
|
|
|
struct _rb2_instance;
|
|
typedef struct _rb2_instance RB2_INSTANCE;
|
|
#define RB2_INSTANCE(ptr) ((RB2_INSTANCE*)(ptr))
|
|
|
|
#define RB2_IDENT_TIMEOUT 100000L // [us] Timeout für periodisches senden der IDENT Telegramme
|
|
#define RB2_REQUEST_TIMEOUT 40L // [ms] Timeout für nicht bestätigte REQUESTs
|
|
|
|
#define RB2_MAGIC 0x77
|
|
|
|
// Festgelegte Ax Nummern
|
|
#define RB_AX_LOCAL 0x00 // Lokales Axensystem
|
|
#define RB_AX_MASTER 0x0D // Ring Master (z.B. Fernbedienung)
|
|
|
|
// Festgelegte Knoten Nummern
|
|
#define RB_NODE_PROXY 0x00 // Knoten mit Anbindung an RING-BUS
|
|
#define RB_NODE_BROADCAST 0x0F // Broadcast an alle Knoten
|
|
|
|
|
|
struct _rb2_link;
|
|
typedef struct _rb2_link RB2_LINK;
|
|
typedef struct _rb2_link rb2_link_t;
|
|
#define RB2_LINK(ptr) ((RB2_LINK*)(ptr))
|
|
|
|
struct _rb2_listed_link;
|
|
typedef struct _rb2_listed_link RB2_LISTED_LINK;
|
|
#define RB2_LISTED_LINK(ptr) ((RB2_LISTED_LINK*)(ptr))
|
|
|
|
struct rb2_stream_link;
|
|
typedef struct rb2_stream_link RB2_STREAM_LINK;
|
|
#define RB2_STREAM_LINK(ptr) ((RB2_STREAM_LINK*)(ptr))
|
|
|
|
struct rb2_usart_link;
|
|
typedef struct rb2_usart_link RB2_USART_LINK;
|
|
#define RB2_USART_LINK(ptr) ((RB2_USART_LINK*)(ptr))
|
|
|
|
struct rb2_can_link;
|
|
typedef struct rb2_can_link RB2_CAN_LINK;
|
|
#define RB2_CAN_LINK(ptr) ((RB2_CAN_LINK*)ptr)
|
|
|
|
|
|
#include <rb2/telegram.h>
|
|
#include <rb2/register.h>
|
|
#include <rb2/link.h>
|
|
#include <rb2/proxy.h>
|
|
#include <rb2/instance.h>
|
|
#include <rb2/api.h>
|
|
|