fbgsense 0.1
Generic FBG spectrum analysis tool
sm125.h
1/*
2 * This file is a part of the project "fbgsense", which is released under MIT license.
3 * Copyright (c) 2022 Daniel Múčka, Masaryk University, Faculty of Informatics
4 * See file LICENSE or visit https://opensource.org/licenses/MIT for full license details.
5 */
6
7#pragma once
8
9#include <cstdint>
10
11constexpr uint16_t sm125_samples = 16001;
12constexpr uint16_t sm125_port = 50000;
13
14constexpr const char* SM125_IDN = "#IDN?";
15constexpr const char* SM125_GET_PRODUCT_SN = "#GET_PRODUCT_SN";
16constexpr const char* SM125_GET_DATA = "#GET_DATA";
17constexpr const char* SM125_GET_SCAN_SPEED = "#GET_SCAN_SPEED";
18constexpr const char* SM125_GET_SYSTEM_IMAGE_ID = "#GET_SYSTEM_IMAGE_ID";
19constexpr const char* SM125_GET_NUM_DAQ_DUTS = "#GET_NUM_DAQ_DUTS"; // undocumented
20constexpr const char* SM125_GET_MIN_WVL_USER_DATA = "#GET_MIN_WVL_USER_DATA"; // undocumented
21constexpr const char* SM125_GET_MAX_WVL_USER_DATA = "#GET_MAX_WVL_USER_DATA"; // undocumented
22
23constexpr const char* SM125_SET_NORMALIZE_DUTS = "#SET_NORMALIZE_DUTS"; // undocumented
24constexpr const char* SM125_SET_DUT_STATE = "#SET_DUT{}_STATE {}"; // channel, [1,0]
25
26// sm125 uses legacy naming scheme in format 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4 etc.
27constexpr size_t sm125_channel_map[16] = {
28 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15, 4, 8, 12, 16
29};
30
31constexpr uint8_t sm125_header_size = 20;