AFHBA404
AFHBA404 connects ACQ2106 to PCI-Express
Macros | Typedefs | Functions | Variables
AcqSys.cpp File Reference

creates system configuration from config. More...

#include "AcqSys.h"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include "nlohmann/json.hpp"
#include <string.h>
#include <stdio.h>
#include <assert.h>

Go to the source code of this file.

Macros

#define COM(i)   "__comment" #i "__"
 Key Value Map
More...
 
#define INSERT_IF(map, vx, vxo, field)
 

Typedefs

using json = nlohmann::json
 
typedef pair< std::string, int > KVP
 
typedef std::map< std::string, int > KVM
 Key Value Pair. More...
 
typedef pair< std::string, string > KVPS
 Key Value Map
More...
 
typedef std::map< std::string, string > KVMS
 Key Value Pair, COMMENT. More...
 

Functions

int get_int (json j, int default_value=0)
 
void add_comments (json &jsys, string &fname)
 
void add_si_lengths (json &jsys, HBA &hba)
 
void store_config (json j, string fname, HBA &hba)
 
bool strstr (string haystack, string needle)
 

Variables

int sched_fifo_priority
 

Detailed Description

creates system configuration from config.

AcqSys.cpp

Created on: 27 Feb 2020 Author: pgm

Definition in file AcqSys.cpp.

Macro Definition Documentation

◆ COM

#define COM (   i)    "__comment" #i "__"

Key Value Map

Definition at line 227 of file AcqSys.cpp.

◆ INSERT_IF

#define INSERT_IF (   map,
  vx,
  vxo,
  field 
)
Value:
if (uut->vx.field){ \
map.insert(KVP(#field, uut->vxo.field)); \
}

Definition at line 229 of file AcqSys.cpp.

Typedef Documentation

◆ json

using json = nlohmann::json

Definition at line 24 of file AcqSys.cpp.

◆ KVM

typedef std::map<std::string, int> KVM

Key Value Pair.

Definition at line 219 of file AcqSys.cpp.

◆ KVMS

typedef std::map<std::string, string> KVMS

Key Value Pair, COMMENT.

Definition at line 222 of file AcqSys.cpp.

◆ KVP

typedef pair<std::string, int> KVP

Definition at line 218 of file AcqSys.cpp.

◆ KVPS

typedef pair<std::string, string> KVPS

Key Value Map

Definition at line 221 of file AcqSys.cpp.

Function Documentation

◆ add_comments()

void add_comments ( json jsys,
string &  fname 
)

Definition at line 233 of file AcqSys.cpp.

◆ add_si_lengths()

void add_si_lengths ( json jsys,
HBA hba 
)

Definition at line 250 of file AcqSys.cpp.

◆ get_int()

int get_int ( json  j,
int  default_value = 0 
)

Definition at line 155 of file AcqSys.cpp.

◆ store_config()

void store_config ( json  j,
string  fname,
HBA hba 
)

Definition at line 270 of file AcqSys.cpp.

◆ strstr()

bool strstr ( string  haystack,
string  needle 
)

Definition at line 322 of file AcqSys.cpp.

Variable Documentation

◆ sched_fifo_priority

int sched_fifo_priority

Definition at line 136 of file afhba-llcontrol.c.

KVP
pair< std::string, int > KVP
Definition: AcqSys.cpp:218