INOS
cinosbus.h File Reference

Short comment. More...

#include <inos.h>
#include <cinosbusjob.h>
#include <cinosbusmodule.h>
#include <atomic>
#include <xmlparser.h>
Include dependency graph for cinosbus.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SINOSBus
 
struct  SINOSBusHook
 
struct  SINOSBusHandler
 
struct  SINOSBusHandlerPort
 
struct  SINOSBusHandlerCall
 
struct  SINOSBusHandlerBuffer
 
struct  SINOSBusInfoHook
 
struct  SINOSBusTiming
 
struct  SINOSBusPostTiming
 
struct  SINOSCatInfo
 
struct  SINOSBusInfo
 
struct  SBusSleeper
 
class  CINOSBus
 
struct  CINOSBus::SCheck
 bus min/max channel numbers More...
 
class  CINOSBusRegister
 
class  CINOSDeviceMap
 
class  CINCOpercent< T >
 

Macros

#define DF_INOS_BUS_DBT   "INOS-BUS"
 
#define DF_INOS_BUS_MAX_NUMBER   4
 
#define DF_INOS_BUS_MAX_DMY_JOBS   4
 
#define DF_INOS_BUS_MAX_CATEGORY   4
 
#define DF_INOS_BUS_MAX_CYCLE_NUMBER   32
 
#define DF_INOS_BUS_CATEGORY_INVALID   255
 
#define DF_INOS_BUS_CATEGORY_1000_US   3
 
#define DF_INOS_BUS_CATEGORY_250_US   2
 
#define DF_INOS_BUS_CATEGORY_125_US   1
 
#define DF_INOS_BUS_CATEGORY_FASTEST   0
 
#define DF_INOS_BUS_CORE_0   0
 
#define DF_INOS_BUS_CORE_1   1
 
#define DF_INOS_BUS_CORE_2   2
 
#define DF_INOS_BUS_CORE_3   3
 
#define DF_INOS_BUS_JOB_CTM_RES   0x8000
 
#define DF_INOS_BUS_JOB_CLD_RES   0x4000
 
#define DF_INOS_BUS_JOB_WTG_RES   0x2000
 
#define DF_INOS_BUS_JOB_TIM_RES   0x1000
 
#define DF_INOS_BUS_JOB_IRQ_REQ   0x0800
 
#define DF_INOS_BUS_JOB_NDY_MSK   0xE000
 
#define DF_INOS_BUS_JOB_IND_MSK   0x07FF
 
#define DF_INOS_BUS_STACKSIZE_MIN   32768
 
#define DF_INOS_BUS_STAT_IDLE   0
 
#define DF_INOS_BUS_STAT_SCAN   1
 
#define DF_INOS_BUS_STAT_INIT   2
 
#define DF_INOS_BUS_STAT_RUN   3
 
#define DF_INOS_BUS_STAT_RUN_DIAG   4
 
#define DF_INOS_BUS_STAT_DOWN   5
 
#define DF_INOS_BUS_STAT_STOPPED   6
 
#define DF_INOS_BUS_OPTION_FLOAT   0x00000001
 
#define DF_INOS_BUS_OPTION_NO_1MS   0x00000002
 
#define DF_INOS_BUS_OPTION_SPLIT_SC   0x00000004
 
#define DF_INOS_BUS_OPTION_STOP_ON_OVERRUN   0x00000008
 
#define DF_INOS_BUS_OPTION_IGNORE_MAC   0x00000010
 
#define DF_INOS_BUS_OPTION_NO_IRQ   0x00000020
 
#define DF_INOS_BUS_OPTION_NO_INCO   0x00000040
 
#define DF_INOS_BUS_OPTION_CYCLE_CAT   0x00000080
 
#define DF_INOS_BUS_OPTION_NO_POST_HANDLER   0x00000100
 
#define DF_INOS_BUS_OPTION_FAKE   0x00000200
 
#define DF_INOS_BUS_OPTION_EXTENDED_PAUSE   0x00000400
 
#define DF_INOS_BUS_OPTION_SIMULATED   0x00000800
 
#define DF_INOS_BUS_OPTION_SLOT_IRQTIME   0x00001000
 
#define DF_INOS_BUS_OPTIONEX_OPT_PORT_HANDLING   0x00000001
 
#define DF_INOS_BUS_OPTIONEX_RINGMODE   0x00000002
 
#define DF_INOS_BUS_OPTIONEX_AUTO_CLOSE   0x00000004
 
#define DF_INOS_BUS_OPTIONEX_LATE_STATE_RUNNING   0x00000008
 
#define DF_INOS_BUS_OPTIONEX_DO_NOT_CREATE_PORTS   0x00000010
 
#define DF_INOS_BUS_OPTIONEX_SETUP_OFFLINE_MODULE   0x00000020
 
#define DF_INOS_BUS_OPTIONEX_USE_ALL_CORES   0x00000040
 
#define DF_INOS_BUS_OPTIONEX_PORTS_PUBLIC   0x00000080
 
#define DF_INOS_BUS_OPTIONEX_MODULES_MULTICORE   0x00000100
 
#define DF_INOS_BUS_OPTIONEX_ONLY_SETUP_KNOWN_MODULES   0x00000200
 
#define DF_INOS_BUS_OPTIONEX_DO_NOT_STOP_ON_TRAP   0x00000400
 
#define DF_INOS_BUS_OPTIONEX_DMA_TRANSFER   0x00000800
 
#define DF_INOS_BUS_OPTIONEX_PORT_REC_OVERWRITE_OFFLINE   0x00001000
 
#define DF_INOS_BUS_OPTIONEX_OPT_CHANNEL_NUMBERING   0x00002000
 
#define DF_INOS_BUS_OPTIONEX_NO_RECEIVE_DATA   0x00004000
 
#define DF_INOS_BUS_OPTIONEX_CLEANUP_AT_RESCAN   0x00008000
 
#define DF_INOS_BUS_OPTIONEX_TRADATA_COPY_IN_RAM   0x00010000
 
#define DF_INOS_BUS_OPTIONEX_LOOPBACK   0x00020000
 
#define DF_INOS_BUS_OPTIONEX_HARDWARE_SLOTCOUNT   0x00040000
 
#define DF_INOS_BUS_OPTIONEX_MULTIPLE_INSTANCE_SUPPORT   0x00080000
 
#define DF_INOS_BUS_SYNCTOLERANCE_DEFAULT   2000
 
#define DF_INOS_BUS_WATCHDOGLEVEL_DEFAULT   4
 
#define ER_INOS_BUS_ERRORCOUNTER   0x00000001
 
#define ER_INOS_BUS_OVERRUNCOUNTER   0x00000002
 
#define ER_INOS_BUS_DOWN   0x00000004
 
#define ER_INOS_BUS_POSTOVERRUNCOUNTER   0x00000008
 
#define ER_INOS_BUS_SYNCCORES_TIMEOUT   0x00000010
 
#define ER_INOS_BUS_RESCAN   0x00000020
 
#define ER_INOS_BUS_MAINTENANCE   0x00000040
 
#define DF_INOS_BUS_HOOK_FLAG_ENB   0x0001
 
#define DF_INOS_BUS_HOOK_FLAG_REM   0x0002
 
#define DF_INOS_BUS_HOOK_ORDER_PRE_AXIS   -20
 bus hook order 'pre axis'
 
#define DF_INOS_BUS_HOOK_ORDER_AXIS_PRE_MAP   -10
 bus hook order 'pre mapping'
 
#define DF_INOS_BUS_HOOK_ORDER_AXIS_MAP   0
 bus hook order 'mapping'
 
#define DF_INOS_BUS_HOOK_ORDER_CONTROL   0
 bus hook order 'control'
 
#define DF_INOS_BUS_HOOK_ORDER_AXIS_PST_MAP   10
 bus hook order 'post mapping'
 
#define DF_INOS_BUS_HOOK_ORDER_PST_AXIS   20
 bus hook order 'post axis'
 
#define DF_INOS_BUS_HOOK_ORDER_DEFAULT   20
 bus hook order 'default'
 
#define DF_INOS_BUS_PAGE_ANALOG   1
 
#define DF_INOS_BUS_PAGE_DIGITAL   2
 
#define DF_INOS_BUS_PAGE_AXIS   3
 
#define INOS_CYCLEID(auCoreId, auCategory, auCycleNumber)   (((uint16)auCoreId<<10)+((uint16)auCategory<<8)+(auCycleNumber&0xff))
 Create cycle id from core id, category and cycle number. A cycle id is a uint16 value, where bit 0..7 (0..255) contains the cycle number, bit 8..9 (0..3) the category and bit 10..15 (0..63) the core id.
 
#define INOS_CORE_FROM_CATEGORY(aCategory)   ((aCategory>>2)&0x3F)
 get core id from category
 
#define INOS_CATEGORY_FROM_CATEGORY(aCategory)   (aCategory&0x03)
 get category from category
 
#define INOS_CORE_FROM_CYCLEID(aCycleId)   ((uint8)((aCycleId>>10)&0x3F))
 get core id from cycle id
 
#define INOS_CATEGORY_FROM_CYCLEID(aCycleId)   ((uint8)((aCycleId>>8)&0x03))
 get category from cycle id
 
#define INOS_CYCLENUMBER_FROM_CYCLEID(aCycleId)   ((uint8)(aCycleId&0xFF))
 get cycle number from cycle id
 
#define INOS_CYCLEID_DONT_CARE   (0xffff)
 don't care cycle id
 
#define INOS_CORE_ID_DONT_CARE   (0x3f)
 don't care core id
 
#define INOS_CYCLEID_ANY_CAT_AND_NUM   ((uint16)0x03ff)
 don't care for cycle category and number, just core id
 
#define INOS_CYCLEID_ANY_ON_CORE(auCoreId)   (((uint16)auCoreId<<10) | INOS_CYCLEID_ANY_CAT_AND_NUM)
 similar to INOS_CYCLEID_DONT_CARE, but with a fixed core id
 

Typedefs

typedef CINOSBus *(* TCreateBus) (SINOSBus *apDesc)
 

Functions

void SleepBusTicks (uint32 auBusTicks, uint32 auBusId=0)
 

Variables

CINOSBusg_pBus [4]
 
CINOSBusg_pBus2 [4]
 
uint32 g_uBusIndex
 

Detailed Description

Short comment.

Author
Ch. Hirzel
Remarks
project         : 
language        : GNU C++
system          : 

Long comment on this file.

Function Documentation

◆ SleepBusTicks()

void SleepBusTicks ( uint32  auBusTicks,
uint32  auBusId = 0 
)

The calling task falls asleep for at most auBusTicks bus ticks where a bus tick equals the highest frequency provided by the bus with id auBusId. Passing 1 for auBusTicks means that the task will be woken up when the next bus interrupts occurs. Passing 0 is therefore not allowed. Note that the 'splitted infolink task' is not considered in this context (the tick frequency is only depending on the bus configuration and is the same with or without using splitti.