mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Use external dependencies for NI and NetComm libraries (#1304)
This removes a number of large binary files from the repo and enables vendors to depend on these libraries separately.
This commit is contained in:
committed by
Peter Johnson
parent
bedef476fd
commit
d2a5aaafdd
@@ -38,7 +38,6 @@ cache:
|
||||
|
||||
script:
|
||||
- python3.5 -m wpiformat -y 2018 -clang 5.0
|
||||
- python3.5 gen/wpilibj_frcnetcomm.py
|
||||
- git --no-pager diff --exit-code HEAD # Ensure formatter made no changes
|
||||
- ./gradlew --no-daemon --console=plain -PskipAthena :hal:halSharedLibrary :hal:halJNISharedLibrary :wpilibc:wpilibcSharedLibrary :wpilibj:jar
|
||||
- mkdir cmake-build && cd cmake-build && env CXX=g++-6 CC=gcc-6 cmake -DWITHOUT_ALLWPILIB=OFF .. && make
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
plugins {
|
||||
id 'base'
|
||||
id 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin' version '2.1'
|
||||
id 'edu.wpi.first.NativeUtils' version '1.7.1'
|
||||
id 'edu.wpi.first.NativeUtils' version '1.7.4'
|
||||
id 'edu.wpi.first.GradleJni' version '0.3.0'
|
||||
id 'edu.wpi.first.GradleVsCode' version '0.4.1'
|
||||
id 'edu.wpi.first.GradleVsCode' version '0.4.2'
|
||||
id 'idea'
|
||||
id 'com.gradle.build-scan' version '1.15.1'
|
||||
id 'net.ltgt.errorprone' version '0.0.15' apply false // For Java 8
|
||||
|
||||
@@ -101,6 +101,7 @@ task generateJavaDocs(type: Javadoc) {
|
||||
options.addStringOption "tag", "pre:a:Pre-Condition"
|
||||
options.addStringOption('Xdoclint:accessibility,html,missing,reference,syntax')
|
||||
dependsOn project(':wpilibj').generateJavaVersion
|
||||
dependsOn project(':hal').generateUsageReporting
|
||||
source project(':hal').sourceSets.main.java
|
||||
source project(':wpiutil').sourceSets.main.java
|
||||
source project(':cscore').sourceSets.main.java
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# This script generates the network communication interface for wpilibj.
|
||||
#
|
||||
# This script takes no arguments and should be invoked from either the gen
|
||||
# directory or the root directory of the project.
|
||||
|
||||
from datetime import date
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
||||
# Check that the current directory is part of a Git repository
|
||||
def in_git_repo(directory):
|
||||
return subprocess.run(["git", "rev-parse"]).returncode == 0
|
||||
|
||||
|
||||
def main():
|
||||
if not in_git_repo("."):
|
||||
print("Error: not invoked within a Git repository", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
# Handle running in either the root or gen directories
|
||||
config_path = "."
|
||||
if os.getcwd().rpartition(os.sep)[2] == "gen":
|
||||
config_path = ".."
|
||||
|
||||
output_name = config_path + \
|
||||
"/hal/src/generated/java/edu/wpi/first/wpilibj/hal/FRCNetComm.java"
|
||||
|
||||
# Set initial copyright year and get current year
|
||||
year = "2016"
|
||||
current_year = str(date.today().year)
|
||||
|
||||
# Start writing output file
|
||||
with open(output_name + ".tmp", "w") as temp:
|
||||
# Write first line of comment
|
||||
temp.write("/*")
|
||||
for i in range(0, 76):
|
||||
temp.write("-")
|
||||
print("*/", file=temp)
|
||||
|
||||
# Write second line of comment
|
||||
temp.write("/* Copyright (c) ")
|
||||
if year != current_year:
|
||||
temp.write(year)
|
||||
temp.write("-")
|
||||
temp.write(current_year)
|
||||
temp.write(" FIRST. All Rights Reserved.")
|
||||
for i in range(0, 24):
|
||||
temp.write(" ")
|
||||
if year == current_year:
|
||||
for i in range(0, 5):
|
||||
temp.write(" ")
|
||||
print("*/", file=temp)
|
||||
|
||||
# Write rest of lines of comment
|
||||
temp.write("""\
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*""")
|
||||
for i in range(0, 76):
|
||||
temp.write("-")
|
||||
print("*/", file=temp)
|
||||
|
||||
# Write preamble
|
||||
temp.write("""
|
||||
// Autogenerated by wpilibj_frcnetcomm.py. Do not manually edit this file.
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
/**
|
||||
* JNI wrapper for library <b>FRC_NetworkCommunication</b><br>.
|
||||
*/
|
||||
@SuppressWarnings({\"MethodName\", \"LineLength\"})
|
||||
public class FRCNetComm extends JNIWrapper {
|
||||
""")
|
||||
|
||||
# Read enums from C++ source files
|
||||
first_enum = True
|
||||
files = [
|
||||
"/ni-libraries/include/FRC_NetworkCommunication/LoadOut.h",
|
||||
"/hal/src/main/native/include/hal/UsageReporting.h"
|
||||
]
|
||||
for file_name in files:
|
||||
with open(config_path + file_name, "r") as cpp_source:
|
||||
while True:
|
||||
# Read until an enum is encountered
|
||||
line = ""
|
||||
pos = -1
|
||||
while "enum" not in line:
|
||||
line = cpp_source.readline()
|
||||
if line == "":
|
||||
break
|
||||
|
||||
if line == "":
|
||||
break
|
||||
|
||||
# If "{" is on next line, read next line
|
||||
if "{" not in line:
|
||||
line = cpp_source.readline()
|
||||
|
||||
# Write enum to output file as interface
|
||||
values = []
|
||||
line = cpp_source.readline()
|
||||
while "}" not in line:
|
||||
if line == os.linesep:
|
||||
values.append("")
|
||||
elif line[0] != "#":
|
||||
try:
|
||||
values.append(
|
||||
re.search("[^,]+", line.strip()).group())
|
||||
except AttributeError:
|
||||
# Ignore lines that don't match value regex
|
||||
pass
|
||||
line = cpp_source.readline()
|
||||
|
||||
# Extract enum name
|
||||
name_start = 0
|
||||
for i, c in enumerate(line):
|
||||
if c != " " and c != "}":
|
||||
name_start = i
|
||||
break
|
||||
enum_name = line[name_start:len(line) - 2]
|
||||
|
||||
# Write comment for interface name
|
||||
# Only add newline if not the first enum
|
||||
if first_enum == True:
|
||||
first_enum = False
|
||||
else:
|
||||
temp.write(os.linesep)
|
||||
temp.write(" /**" + os.linesep + " * ")
|
||||
|
||||
# Splits camelcase string into words
|
||||
enum_camel = re.findall(
|
||||
r'[A-Z](?:[a-z]+|[A-Z]*(?=[A-Z]|$))', enum_name)
|
||||
temp.write(enum_camel[0] + " ")
|
||||
for i in range(1, len(enum_camel)):
|
||||
temp.write(enum_camel[i][0].lower() + \
|
||||
enum_camel[i][1:len(enum_camel[i])] + " ")
|
||||
temp.write(
|
||||
"from " + os.path.basename(file_name) + os.linesep +
|
||||
" */" + os.linesep +
|
||||
" @SuppressWarnings({\"TypeName\", \"PMD.ConstantsInInterface\"})" + os.linesep + \
|
||||
" public static final class " + enum_name + " {" + os.linesep + \
|
||||
" private " + enum_name + "() {" + os.linesep + " }" + os.linesep + os.linesep)
|
||||
|
||||
# Write enum values
|
||||
count = 0
|
||||
for value in values:
|
||||
# Pass through empty lines
|
||||
if value == "":
|
||||
temp.write(os.linesep)
|
||||
continue
|
||||
|
||||
if "=" not in value:
|
||||
value = value + " = " + str(count)
|
||||
count += 1
|
||||
|
||||
# Add scoping for values from a different enum
|
||||
if enum_name != "tModuleType" and "kModuleType" in value:
|
||||
value = value.replace("kModuleType",
|
||||
"tModuleType.kModuleType")
|
||||
temp.write(" public static final int " +
|
||||
value[0:len(value)] + ";" + os.linesep)
|
||||
|
||||
# Write end of enum
|
||||
print(" }", file=temp)
|
||||
|
||||
# Write closing brace for file
|
||||
print("}", file=temp)
|
||||
|
||||
# Replace old output file
|
||||
try:
|
||||
os.remove(output_name)
|
||||
except OSError:
|
||||
pass
|
||||
os.rename(output_name + ".tmp", output_name)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,6 +1,28 @@
|
||||
project(hal)
|
||||
|
||||
|
||||
file(STRINGS src/generate/Instances.txt RAW_INSTANCES)
|
||||
file(STRINGS src/generate/ResourceType.txt RAW_RESOURCE_TYPES)
|
||||
|
||||
SET(usage_reporting_types_cpp "")
|
||||
SET(usage_reporting_instances_cpp "")
|
||||
SET(usage_reporting_types "")
|
||||
SET(usage_reporting_instances "")
|
||||
|
||||
foreach(ITEM ${RAW_INSTANCES})
|
||||
list(APPEND usage_reporting_instances_cpp " ${ITEM},")
|
||||
list(APPEND usage_reporting_instances "\n public static final int ${ITEM};")
|
||||
endforeach()
|
||||
|
||||
foreach(ITEM ${RAW_RESOURCE_TYPES})
|
||||
list(APPEND usage_reporting_types_cpp " ${ITEM},")
|
||||
list(APPEND usage_reporting_types "\n public static final int ${ITEM};")
|
||||
endforeach()
|
||||
|
||||
string(REPLACE ";" "\n" usage_reporting_types_cpp "${usage_reporting_types_cpp}")
|
||||
string(REPLACE ";" "\n" usage_reporting_instances_cpp "${usage_reporting_instances_cpp}")
|
||||
|
||||
|
||||
# Java bindings
|
||||
if (NOT WITHOUT_JAVA)
|
||||
find_package(Java REQUIRED)
|
||||
@@ -8,12 +30,14 @@ if (NOT WITHOUT_JAVA)
|
||||
include(UseJava)
|
||||
set(CMAKE_JAVA_COMPILE_FLAGS "-Xlint:unchecked")
|
||||
|
||||
configure_file(src/generate/FRCNetComm.java.in FRCNetComm.java)
|
||||
|
||||
file(GLOB
|
||||
hal_shared_jni_src src/main/native/cpp/jni/*.cpp
|
||||
hal_sim_jni_src src/main/native/sim/jni/*.cpp)
|
||||
|
||||
file(GLOB_RECURSE JAVA_SOURCES
|
||||
src/generated/java/*.java
|
||||
${CMAKE_CURRENT_BINARY_DIR}/FRCNetComm.java
|
||||
src/main/java/*.java)
|
||||
set(CMAKE_JNI_TARGET true)
|
||||
|
||||
@@ -44,11 +68,17 @@ else()
|
||||
target_sources(hal PRIVATE ${hal_sim_native_src} ${hal_sim_jni_src})
|
||||
endif()
|
||||
|
||||
configure_file(src/generate/FRCUsageReporting.h.in gen/hal/FRCUsageReporting.h)
|
||||
|
||||
set_target_properties(hal PROPERTIES OUTPUT_NAME "wpiHal")
|
||||
|
||||
target_include_directories(hal PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/include>
|
||||
$<INSTALL_INTERFACE:${include_dest}/hal>)
|
||||
|
||||
target_include_directories(hal PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/gen>
|
||||
$<INSTALL_INTERFACE:${include_dest}/hal>)
|
||||
target_link_libraries(hal PUBLIC wpiutil)
|
||||
|
||||
set_property(TARGET hal PROPERTY FOLDER "libraries")
|
||||
@@ -65,6 +95,7 @@ endif()
|
||||
|
||||
install(TARGETS hal EXPORT hal DESTINATION "${main_lib_dest}")
|
||||
install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/hal")
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gen DESTINATION "${include_dest}/hal")
|
||||
|
||||
if (NOT WITHOUT_JAVA AND MSVC)
|
||||
install(TARGETS hal RUNTIME DESTINATION "${jni_lib_dest}" COMPONENT Runtime)
|
||||
|
||||
@@ -1,9 +1,65 @@
|
||||
def javaResourceFile = file("$buildDir/generated/java/edu/wpi/first/wpilibj/hal/FRCNetComm.java")
|
||||
def cppResourceFile = file("$buildDir/generated/headers/hal/FRCUsageReporting.h")
|
||||
|
||||
def generateUsageReporting = tasks.register('generateUsageReporting') {
|
||||
def javaBase = file('src/generate/FRCNetComm.java.in')
|
||||
def cppBase = file('src/generate/FRCUsageReporting.h.in')
|
||||
|
||||
def instances = file('src/generate/Instances.txt')
|
||||
def resourceType = file('src/generate/ResourceType.txt')
|
||||
|
||||
inputs.file(javaBase)
|
||||
inputs.file(cppBase)
|
||||
inputs.file(instances)
|
||||
inputs.file(resourceType)
|
||||
|
||||
outputs.file(javaResourceFile)
|
||||
outputs.file(cppResourceFile)
|
||||
|
||||
doLast {
|
||||
def instanceTextJava = instances as String[]
|
||||
def instanceTextCpp = instances as String[]
|
||||
def resourceTextJava = resourceType as String[]
|
||||
def resourceTextCpp = resourceType as String[]
|
||||
|
||||
instanceTextJava = instanceTextJava.collect {
|
||||
" public static final int ${it};"
|
||||
}.join('\n')
|
||||
|
||||
instanceTextCpp = instanceTextCpp.collect {
|
||||
" ${it},"
|
||||
}.join('\n')
|
||||
|
||||
resourceTextJava = resourceTextJava.collect {
|
||||
" public static final int ${it};"
|
||||
}.join('\n')
|
||||
|
||||
resourceTextCpp = resourceTextCpp.collect {
|
||||
" ${it},"
|
||||
}.join('\n')
|
||||
|
||||
javaResourceFile.text = javaBase.text.replace('${usage_reporting_types}', resourceTextJava).replace('${usage_reporting_instances}', instanceTextJava)
|
||||
cppResourceFile.text = cppBase.text.replace('${usage_reporting_types_cpp}', resourceTextCpp).replace('${usage_reporting_instances_cpp}', instanceTextCpp)
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
addHalDependency = { binary, shared->
|
||||
binary.tasks.withType(AbstractNativeSourceCompileTask) {
|
||||
it.dependsOn generateUsageReporting
|
||||
}
|
||||
binary.lib project: ':hal', library: 'hal', linkage: shared
|
||||
}
|
||||
|
||||
nativeName = 'hal'
|
||||
setBaseName = 'wpiHal'
|
||||
devMain = 'DevMain'
|
||||
niLibraries = true
|
||||
generatedHeaders = "$buildDir/generated/headers"
|
||||
splitSetup = {
|
||||
it.tasks.withType(AbstractNativeSourceCompileTask) {
|
||||
it.dependsOn generateUsageReporting
|
||||
}
|
||||
if (it.targetPlatform.architecture.name == 'athena') {
|
||||
it.sources {
|
||||
athenaCpp(CppSourceSet) {
|
||||
@@ -12,7 +68,8 @@ ext {
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/main/native/include'
|
||||
srcDir 'src/main/native/include'
|
||||
srcDir generatedHeaders
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +81,8 @@ ext {
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/main/native/include'
|
||||
srcDir 'src/main/native/include'
|
||||
srcDir generatedHeaders
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,6 +93,12 @@ ext {
|
||||
apply from: "${rootDir}/shared/jni/setupBuild.gradle"
|
||||
apply from: 'simjni.gradle'
|
||||
|
||||
sourceSets.main.java.srcDir "${buildDir}/generated/java/"
|
||||
|
||||
compileJava {
|
||||
dependsOn generateUsageReporting
|
||||
}
|
||||
|
||||
cppSourcesZip {
|
||||
from('src/main/native/athena') {
|
||||
into '/athena'
|
||||
@@ -51,6 +115,12 @@ cppSourcesZip {
|
||||
dependsOn generateAthenaSimFiles
|
||||
}
|
||||
|
||||
cppHeadersZip {
|
||||
from(generatedHeaders) {
|
||||
into '/hal'
|
||||
}
|
||||
}
|
||||
|
||||
model {
|
||||
// Exports config is a utility to enable exporting all symbols in a C++ library on windows to a DLL.
|
||||
// This removes the need for DllExport on a library. However, the gradle C++ builder has a bug
|
||||
@@ -89,5 +159,3 @@ model {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main.java.srcDir "$projectDir/src/generated/java/"
|
||||
|
||||
33
hal/src/generate/FRCNetComm.java.in
Normal file
33
hal/src/generate/FRCNetComm.java.in
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Autogenerated file! Do not manually edit this file.
|
||||
*/
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
/**
|
||||
* JNI wrapper for library <b>FRC_NetworkCommunication</b><br>.
|
||||
*/
|
||||
@SuppressWarnings({"MethodName", "LineLength"})
|
||||
public class FRCNetComm {
|
||||
/**
|
||||
* Resource type from UsageReporting.
|
||||
*/
|
||||
@SuppressWarnings({"TypeName", "PMD.ConstantsInInterface"})
|
||||
public static final class tResourceType {
|
||||
private tResourceType() {
|
||||
}
|
||||
|
||||
${usage_reporting_types}
|
||||
}
|
||||
|
||||
/**
|
||||
* Instances from UsageReporting.
|
||||
*/
|
||||
@SuppressWarnings({"TypeName", "PMD.ConstantsInInterface"})
|
||||
public static final class tInstances {
|
||||
private tInstances() {
|
||||
}
|
||||
|
||||
${usage_reporting_instances}
|
||||
}
|
||||
}
|
||||
14
hal/src/generate/FRCUsageReporting.h.in
Normal file
14
hal/src/generate/FRCUsageReporting.h.in
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* Autogenerated file! Do not manually edit this file.
|
||||
*/
|
||||
|
||||
namespace HALUsageReporting {
|
||||
typedef enum {
|
||||
${usage_reporting_types_cpp}
|
||||
} tResourceType;
|
||||
typedef enum {
|
||||
${usage_reporting_instances_cpp}
|
||||
} tInstances;
|
||||
}
|
||||
44
hal/src/generate/Instances.txt
Normal file
44
hal/src/generate/Instances.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
kLanguage_LabVIEW = 1
|
||||
kLanguage_CPlusPlus = 2
|
||||
kLanguage_Java = 3
|
||||
kLanguage_Python = 4
|
||||
kLanguage_DotNet = 5
|
||||
kCANPlugin_BlackJagBridge = 1
|
||||
kCANPlugin_2CAN = 2
|
||||
kFramework_Iterative = 1
|
||||
kFramework_Simple = 2
|
||||
kFramework_CommandControl = 3
|
||||
kFramework_Timed = 4
|
||||
kFramework_ROS = 5
|
||||
kFramework_RobotBuilder = 6
|
||||
kRobotDrive_ArcadeStandard = 1
|
||||
kRobotDrive_ArcadeButtonSpin = 2
|
||||
kRobotDrive_ArcadeRatioCurve = 3
|
||||
kRobotDrive_Tank = 4
|
||||
kRobotDrive_MecanumPolar = 5
|
||||
kRobotDrive_MecanumCartesian = 6
|
||||
kRobotDrive2_DifferentialArcade = 7
|
||||
kRobotDrive2_DifferentialTank = 8
|
||||
kRobotDrive2_DifferentialCurvature = 9
|
||||
kRobotDrive2_MecanumCartesian = 10
|
||||
kRobotDrive2_MecanumPolar = 11
|
||||
kRobotDrive2_KilloughCartesian = 12
|
||||
kRobotDrive2_KilloughPolar = 13
|
||||
kDriverStationCIO_Analog = 1
|
||||
kDriverStationCIO_DigitalIn = 2
|
||||
kDriverStationCIO_DigitalOut = 3
|
||||
kDriverStationEIO_Acceleration = 1
|
||||
kDriverStationEIO_AnalogIn = 2
|
||||
kDriverStationEIO_AnalogOut = 3
|
||||
kDriverStationEIO_Button = 4
|
||||
kDriverStationEIO_LED = 5
|
||||
kDriverStationEIO_DigitalIn = 6
|
||||
kDriverStationEIO_DigitalOut = 7
|
||||
kDriverStationEIO_FixedDigitalOut = 8
|
||||
kDriverStationEIO_PWM = 9
|
||||
kDriverStationEIO_Encoder = 10
|
||||
kDriverStationEIO_TouchSlider = 11
|
||||
kADXL345_SPI = 1
|
||||
kADXL345_I2C = 2
|
||||
kCommand_Scheduler = 1
|
||||
kSmartDashboard_Instance = 1
|
||||
82
hal/src/generate/ResourceType.txt
Normal file
82
hal/src/generate/ResourceType.txt
Normal file
@@ -0,0 +1,82 @@
|
||||
kResourceType_Controller = 0
|
||||
kResourceType_Module = 1
|
||||
kResourceType_Language = 2
|
||||
kResourceType_CANPlugin = 3
|
||||
kResourceType_Accelerometer = 4
|
||||
kResourceType_ADXL345 = 5
|
||||
kResourceType_AnalogChannel = 6
|
||||
kResourceType_AnalogTrigger = 7
|
||||
kResourceType_AnalogTriggerOutput = 8
|
||||
kResourceType_CANJaguar = 9
|
||||
kResourceType_Compressor = 10
|
||||
kResourceType_Counter = 11
|
||||
kResourceType_Dashboard = 12
|
||||
kResourceType_DigitalInput = 13
|
||||
kResourceType_DigitalOutput = 14
|
||||
kResourceType_DriverStationCIO = 15
|
||||
kResourceType_DriverStationEIO = 16
|
||||
kResourceType_DriverStationLCD = 17
|
||||
kResourceType_Encoder = 18
|
||||
kResourceType_GearTooth = 19
|
||||
kResourceType_Gyro = 20
|
||||
kResourceType_I2C = 21
|
||||
kResourceType_Framework = 22
|
||||
kResourceType_Jaguar = 23
|
||||
kResourceType_Joystick = 24
|
||||
kResourceType_Kinect = 25
|
||||
kResourceType_KinectStick = 26
|
||||
kResourceType_PIDController = 27
|
||||
kResourceType_Preferences = 28
|
||||
kResourceType_PWM = 29
|
||||
kResourceType_Relay = 30
|
||||
kResourceType_RobotDrive = 31
|
||||
kResourceType_SerialPort = 32
|
||||
kResourceType_Servo = 33
|
||||
kResourceType_Solenoid = 34
|
||||
kResourceType_SPI = 35
|
||||
kResourceType_Task = 36
|
||||
kResourceType_Ultrasonic = 37
|
||||
kResourceType_Victor = 38
|
||||
kResourceType_Button = 39
|
||||
kResourceType_Command = 40
|
||||
kResourceType_AxisCamera = 41
|
||||
kResourceType_PCVideoServer = 42
|
||||
kResourceType_SmartDashboard = 43
|
||||
kResourceType_Talon = 44
|
||||
kResourceType_HiTechnicColorSensor = 45
|
||||
kResourceType_HiTechnicAccel = 46
|
||||
kResourceType_HiTechnicCompass = 47
|
||||
kResourceType_SRF08 = 48
|
||||
kResourceType_AnalogOutput = 49
|
||||
kResourceType_VictorSP = 50
|
||||
kResourceType_PWMTalonSRX = 51
|
||||
kResourceType_CANTalonSRX = 52
|
||||
kResourceType_ADXL362 = 53
|
||||
kResourceType_ADXRS450 = 54
|
||||
kResourceType_RevSPARK = 55
|
||||
kResourceType_MindsensorsSD540 = 56
|
||||
kResourceType_DigitalGlitchFilter = 57
|
||||
kResourceType_ADIS16448 = 58
|
||||
kResourceType_PDP = 59
|
||||
kResourceType_PCM = 60
|
||||
kResourceType_PigeonIMU = 61
|
||||
kResourceType_NidecBrushless = 62
|
||||
kResourceType_CANifier = 63
|
||||
kResourceType_CTRE_future0 = 64
|
||||
kResourceType_CTRE_future1 = 65
|
||||
kResourceType_CTRE_future2 = 66
|
||||
kResourceType_CTRE_future3 = 67
|
||||
kResourceType_CTRE_future4 = 68
|
||||
kResourceType_CTRE_future5 = 69
|
||||
kResourceType_CTRE_future6 = 70
|
||||
kResourceType_LinearFilter = 71
|
||||
kResourceType_XboxController = 72
|
||||
kResourceType_UsbCamera = 73
|
||||
kResourceType_NavX = 74
|
||||
kResourceType_Pixy = 75
|
||||
kResourceType_Pixy2 = 76
|
||||
kResourceType_ScanseSweep = 77
|
||||
kResourceType_Shuffleboard = 78
|
||||
kResourceType_CAN = 79
|
||||
kResourceType_DigilentDMC60 = 80
|
||||
kResourceType_PWMVictorSPX = 81
|
||||
@@ -1,204 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
// Autogenerated by wpilibj_frcnetcomm.py. Do not manually edit this file.
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
/**
|
||||
* JNI wrapper for library <b>FRC_NetworkCommunication</b><br>.
|
||||
*/
|
||||
@SuppressWarnings({"MethodName", "LineLength"})
|
||||
public class FRCNetComm extends JNIWrapper {
|
||||
/**
|
||||
* Module type from LoadOut.h
|
||||
*/
|
||||
@SuppressWarnings({"TypeName", "PMD.ConstantsInInterface"})
|
||||
public static final class tModuleType {
|
||||
private tModuleType() {
|
||||
}
|
||||
|
||||
public static final int kModuleType_Unknown = 0x00;
|
||||
public static final int kModuleType_Analog = 0x01;
|
||||
public static final int kModuleType_Digital = 0x02;
|
||||
public static final int kModuleType_Solenoid = 0x03;
|
||||
}
|
||||
|
||||
/**
|
||||
* Target class from LoadOut.h
|
||||
*/
|
||||
@SuppressWarnings({"TypeName", "PMD.ConstantsInInterface"})
|
||||
public static final class tTargetClass {
|
||||
private tTargetClass() {
|
||||
}
|
||||
|
||||
public static final int kTargetClass_Unknown = 0x00;
|
||||
public static final int kTargetClass_FRC1 = 0x10;
|
||||
public static final int kTargetClass_FRC2 = 0x20;
|
||||
public static final int kTargetClass_FRC3 = 0x30;
|
||||
public static final int kTargetClass_RoboRIO = 0x40;
|
||||
public static final int kTargetClass_FRC2_Analog = kTargetClass_FRC2 | tModuleType.kModuleType_Analog;
|
||||
public static final int kTargetClass_FRC2_Digital = kTargetClass_FRC2 | tModuleType.kModuleType_Digital;
|
||||
public static final int kTargetClass_FRC2_Solenoid = kTargetClass_FRC2 | tModuleType.kModuleType_Solenoid;
|
||||
public static final int kTargetClass_FamilyMask = 0xF0;
|
||||
public static final int kTargetClass_ModuleMask = 0x0F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resource type from UsageReporting.h
|
||||
*/
|
||||
@SuppressWarnings({"TypeName", "PMD.ConstantsInInterface"})
|
||||
public static final class tResourceType {
|
||||
private tResourceType() {
|
||||
}
|
||||
|
||||
public static final int kResourceType_Controller = 0;
|
||||
public static final int kResourceType_Module = 1;
|
||||
public static final int kResourceType_Language = 2;
|
||||
public static final int kResourceType_CANPlugin = 3;
|
||||
public static final int kResourceType_Accelerometer = 4;
|
||||
public static final int kResourceType_ADXL345 = 5;
|
||||
public static final int kResourceType_AnalogChannel = 6;
|
||||
public static final int kResourceType_AnalogTrigger = 7;
|
||||
public static final int kResourceType_AnalogTriggerOutput = 8;
|
||||
public static final int kResourceType_CANJaguar = 9;
|
||||
public static final int kResourceType_Compressor = 10;
|
||||
public static final int kResourceType_Counter = 11;
|
||||
public static final int kResourceType_Dashboard = 12;
|
||||
public static final int kResourceType_DigitalInput = 13;
|
||||
public static final int kResourceType_DigitalOutput = 14;
|
||||
public static final int kResourceType_DriverStationCIO = 15;
|
||||
public static final int kResourceType_DriverStationEIO = 16;
|
||||
public static final int kResourceType_DriverStationLCD = 17;
|
||||
public static final int kResourceType_Encoder = 18;
|
||||
public static final int kResourceType_GearTooth = 19;
|
||||
public static final int kResourceType_Gyro = 20;
|
||||
public static final int kResourceType_I2C = 21;
|
||||
public static final int kResourceType_Framework = 22;
|
||||
public static final int kResourceType_Jaguar = 23;
|
||||
public static final int kResourceType_Joystick = 24;
|
||||
public static final int kResourceType_Kinect = 25;
|
||||
public static final int kResourceType_KinectStick = 26;
|
||||
public static final int kResourceType_PIDController = 27;
|
||||
public static final int kResourceType_Preferences = 28;
|
||||
public static final int kResourceType_PWM = 29;
|
||||
public static final int kResourceType_Relay = 30;
|
||||
public static final int kResourceType_RobotDrive = 31;
|
||||
public static final int kResourceType_SerialPort = 32;
|
||||
public static final int kResourceType_Servo = 33;
|
||||
public static final int kResourceType_Solenoid = 34;
|
||||
public static final int kResourceType_SPI = 35;
|
||||
public static final int kResourceType_Task = 36;
|
||||
public static final int kResourceType_Ultrasonic = 37;
|
||||
public static final int kResourceType_Victor = 38;
|
||||
public static final int kResourceType_Button = 39;
|
||||
public static final int kResourceType_Command = 40;
|
||||
public static final int kResourceType_AxisCamera = 41;
|
||||
public static final int kResourceType_PCVideoServer = 42;
|
||||
public static final int kResourceType_SmartDashboard = 43;
|
||||
public static final int kResourceType_Talon = 44;
|
||||
public static final int kResourceType_HiTechnicColorSensor = 45;
|
||||
public static final int kResourceType_HiTechnicAccel = 46;
|
||||
public static final int kResourceType_HiTechnicCompass = 47;
|
||||
public static final int kResourceType_SRF08 = 48;
|
||||
public static final int kResourceType_AnalogOutput = 49;
|
||||
public static final int kResourceType_VictorSP = 50;
|
||||
public static final int kResourceType_PWMTalonSRX = 51;
|
||||
public static final int kResourceType_CANTalonSRX = 52;
|
||||
public static final int kResourceType_ADXL362 = 53;
|
||||
public static final int kResourceType_ADXRS450 = 54;
|
||||
public static final int kResourceType_RevSPARK = 55;
|
||||
public static final int kResourceType_MindsensorsSD540 = 56;
|
||||
public static final int kResourceType_DigitalGlitchFilter = 57;
|
||||
public static final int kResourceType_ADIS16448 = 58;
|
||||
public static final int kResourceType_PDP = 59;
|
||||
public static final int kResourceType_PCM = 60;
|
||||
public static final int kResourceType_PigeonIMU = 61;
|
||||
public static final int kResourceType_NidecBrushless = 62;
|
||||
public static final int kResourceType_CANifier = 63;
|
||||
public static final int kResourceType_CTRE_future0 = 64;
|
||||
public static final int kResourceType_CTRE_future1 = 65;
|
||||
public static final int kResourceType_CTRE_future2 = 66;
|
||||
public static final int kResourceType_CTRE_future3 = 67;
|
||||
public static final int kResourceType_CTRE_future4 = 68;
|
||||
public static final int kResourceType_CTRE_future5 = 69;
|
||||
public static final int kResourceType_CTRE_future6 = 70;
|
||||
public static final int kResourceType_LinearFilter = 71;
|
||||
public static final int kResourceType_XboxController = 72;
|
||||
public static final int kResourceType_UsbCamera = 73;
|
||||
public static final int kResourceType_NavX = 74;
|
||||
public static final int kResourceType_Pixy = 75;
|
||||
public static final int kResourceType_Pixy2 = 76;
|
||||
public static final int kResourceType_ScanseSweep = 77;
|
||||
public static final int kResourceType_Shuffleboard = 78;
|
||||
public static final int kResourceType_CAN = 79;
|
||||
public static final int kResourceType_DigilentDMC60 = 80;
|
||||
public static final int kResourceType_PWMVictorSPX = 81;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instances from UsageReporting.h
|
||||
*/
|
||||
@SuppressWarnings({"TypeName", "PMD.ConstantsInInterface"})
|
||||
public static final class tInstances {
|
||||
private tInstances() {
|
||||
}
|
||||
|
||||
public static final int kLanguage_LabVIEW = 1;
|
||||
public static final int kLanguage_CPlusPlus = 2;
|
||||
public static final int kLanguage_Java = 3;
|
||||
public static final int kLanguage_Python = 4;
|
||||
public static final int kLanguage_DotNet = 5;
|
||||
|
||||
public static final int kCANPlugin_BlackJagBridge = 1;
|
||||
public static final int kCANPlugin_2CAN = 2;
|
||||
|
||||
public static final int kFramework_Iterative = 1;
|
||||
public static final int kFramework_Simple = 2;
|
||||
public static final int kFramework_CommandControl = 3;
|
||||
public static final int kFramework_Timed = 4;
|
||||
public static final int kFramework_ROS = 5;
|
||||
public static final int kFramework_RobotBuilder = 6;
|
||||
|
||||
public static final int kRobotDrive_ArcadeStandard = 1;
|
||||
public static final int kRobotDrive_ArcadeButtonSpin = 2;
|
||||
public static final int kRobotDrive_ArcadeRatioCurve = 3;
|
||||
public static final int kRobotDrive_Tank = 4;
|
||||
public static final int kRobotDrive_MecanumPolar = 5;
|
||||
public static final int kRobotDrive_MecanumCartesian = 6;
|
||||
public static final int kRobotDrive2_DifferentialArcade = 7;
|
||||
public static final int kRobotDrive2_DifferentialTank = 8;
|
||||
public static final int kRobotDrive2_DifferentialCurvature = 9;
|
||||
public static final int kRobotDrive2_MecanumCartesian = 10;
|
||||
public static final int kRobotDrive2_MecanumPolar = 11;
|
||||
public static final int kRobotDrive2_KilloughCartesian = 12;
|
||||
public static final int kRobotDrive2_KilloughPolar = 13;
|
||||
|
||||
public static final int kDriverStationCIO_Analog = 1;
|
||||
public static final int kDriverStationCIO_DigitalIn = 2;
|
||||
public static final int kDriverStationCIO_DigitalOut = 3;
|
||||
|
||||
public static final int kDriverStationEIO_Acceleration = 1;
|
||||
public static final int kDriverStationEIO_AnalogIn = 2;
|
||||
public static final int kDriverStationEIO_AnalogOut = 3;
|
||||
public static final int kDriverStationEIO_Button = 4;
|
||||
public static final int kDriverStationEIO_LED = 5;
|
||||
public static final int kDriverStationEIO_DigitalIn = 6;
|
||||
public static final int kDriverStationEIO_DigitalOut = 7;
|
||||
public static final int kDriverStationEIO_FixedDigitalOut = 8;
|
||||
public static final int kDriverStationEIO_PWM = 9;
|
||||
public static final int kDriverStationEIO_Encoder = 10;
|
||||
public static final int kDriverStationEIO_TouchSlider = 11;
|
||||
|
||||
public static final int kADXL345_SPI = 1;
|
||||
public static final int kADXL345_I2C = 2;
|
||||
|
||||
public static final int kCommand_Scheduler = 1;
|
||||
|
||||
public static final int kSmartDashboard_Instance = 1;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <FRC_NetworkCommunication/FRCComm.h>
|
||||
#include <FRC_NetworkCommunication/LoadOut.h>
|
||||
#include <FRC_NetworkCommunication/UsageReporting.h>
|
||||
#include <wpi/mutex.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
#include <wpi/timestamp.h>
|
||||
|
||||
@@ -41,9 +41,7 @@
|
||||
#include "hal/Types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "UsageReporting.h"
|
||||
|
||||
namespace HALUsageReporting = nUsageReporting;
|
||||
#include "hal/FRCUsageReporting.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
#ifndef __UsageReporting_h__
|
||||
#define __UsageReporting_h__
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <stdint.h>
|
||||
#define EXPORT_FUNC __declspec(dllexport) __cdecl
|
||||
#elif defined (__vxworks)
|
||||
#include <vxWorks.h>
|
||||
#define EXPORT_FUNC
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#define EXPORT_FUNC
|
||||
#endif
|
||||
|
||||
#define kUsageReporting_version 1
|
||||
|
||||
namespace nUsageReporting
|
||||
{
|
||||
typedef enum
|
||||
{
|
||||
kResourceType_Controller,
|
||||
kResourceType_Module,
|
||||
kResourceType_Language,
|
||||
kResourceType_CANPlugin,
|
||||
kResourceType_Accelerometer,
|
||||
kResourceType_ADXL345,
|
||||
kResourceType_AnalogChannel,
|
||||
kResourceType_AnalogTrigger,
|
||||
kResourceType_AnalogTriggerOutput,
|
||||
kResourceType_CANJaguar,
|
||||
kResourceType_Compressor, // 10
|
||||
kResourceType_Counter,
|
||||
kResourceType_Dashboard,
|
||||
kResourceType_DigitalInput,
|
||||
kResourceType_DigitalOutput,
|
||||
kResourceType_DriverStationCIO,
|
||||
kResourceType_DriverStationEIO,
|
||||
kResourceType_DriverStationLCD,
|
||||
kResourceType_Encoder,
|
||||
kResourceType_GearTooth,
|
||||
kResourceType_Gyro, // 20
|
||||
kResourceType_I2C,
|
||||
kResourceType_Framework,
|
||||
kResourceType_Jaguar,
|
||||
kResourceType_Joystick,
|
||||
kResourceType_Kinect,
|
||||
kResourceType_KinectStick,
|
||||
kResourceType_PIDController,
|
||||
kResourceType_Preferences,
|
||||
kResourceType_PWM,
|
||||
kResourceType_Relay, // 30
|
||||
kResourceType_RobotDrive,
|
||||
kResourceType_SerialPort,
|
||||
kResourceType_Servo,
|
||||
kResourceType_Solenoid,
|
||||
kResourceType_SPI,
|
||||
kResourceType_Task,
|
||||
kResourceType_Ultrasonic,
|
||||
kResourceType_Victor,
|
||||
kResourceType_Button,
|
||||
kResourceType_Command, // 40
|
||||
kResourceType_AxisCamera,
|
||||
kResourceType_PCVideoServer,
|
||||
kResourceType_SmartDashboard,
|
||||
kResourceType_Talon,
|
||||
kResourceType_HiTechnicColorSensor,
|
||||
kResourceType_HiTechnicAccel,
|
||||
kResourceType_HiTechnicCompass,
|
||||
kResourceType_SRF08,
|
||||
kResourceType_AnalogOutput,
|
||||
kResourceType_VictorSP, // 50
|
||||
kResourceType_PWMTalonSRX,
|
||||
kResourceType_CANTalonSRX,
|
||||
kResourceType_ADXL362,
|
||||
kResourceType_ADXRS450,
|
||||
kResourceType_RevSPARK,
|
||||
kResourceType_MindsensorsSD540,
|
||||
kResourceType_DigitalGlitchFilter,
|
||||
kResourceType_ADIS16448,
|
||||
kResourceType_PDP,
|
||||
kResourceType_PCM, // 60
|
||||
kResourceType_PigeonIMU,
|
||||
kResourceType_NidecBrushless,
|
||||
kResourceType_CANifier,
|
||||
kResourceType_CTRE_future0,
|
||||
kResourceType_CTRE_future1,
|
||||
kResourceType_CTRE_future2,
|
||||
kResourceType_CTRE_future3,
|
||||
kResourceType_CTRE_future4,
|
||||
kResourceType_CTRE_future5,
|
||||
kResourceType_CTRE_future6, // 70
|
||||
kResourceType_LinearFilter,
|
||||
kResourceType_XboxController,
|
||||
kResourceType_UsbCamera,
|
||||
kResourceType_NavX,
|
||||
kResourceType_Pixy,
|
||||
kResourceType_Pixy2,
|
||||
kResourceType_ScanseSweep,
|
||||
kResourceType_Shuffleboard,
|
||||
kResourceType_CAN,
|
||||
kResourceType_DigilentDMC60, // 80
|
||||
kResourceType_PWMVictorSPX,
|
||||
} tResourceType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kLanguage_LabVIEW = 1,
|
||||
kLanguage_CPlusPlus = 2,
|
||||
kLanguage_Java = 3,
|
||||
kLanguage_Python = 4,
|
||||
kLanguage_DotNet = 5,
|
||||
|
||||
kCANPlugin_BlackJagBridge = 1,
|
||||
kCANPlugin_2CAN = 2,
|
||||
|
||||
kFramework_Iterative = 1,
|
||||
kFramework_Simple = 2,
|
||||
kFramework_CommandControl = 3,
|
||||
kFramework_Timed = 4,
|
||||
kFramework_ROS = 5,
|
||||
kFramework_RobotBuilder = 6,
|
||||
|
||||
kRobotDrive_ArcadeStandard = 1,
|
||||
kRobotDrive_ArcadeButtonSpin = 2,
|
||||
kRobotDrive_ArcadeRatioCurve = 3,
|
||||
kRobotDrive_Tank = 4,
|
||||
kRobotDrive_MecanumPolar = 5,
|
||||
kRobotDrive_MecanumCartesian = 6,
|
||||
kRobotDrive2_DifferentialArcade = 7,
|
||||
kRobotDrive2_DifferentialTank = 8,
|
||||
kRobotDrive2_DifferentialCurvature = 9,
|
||||
kRobotDrive2_MecanumCartesian = 10,
|
||||
kRobotDrive2_MecanumPolar = 11,
|
||||
kRobotDrive2_KilloughCartesian = 12,
|
||||
kRobotDrive2_KilloughPolar = 13,
|
||||
|
||||
kDriverStationCIO_Analog = 1,
|
||||
kDriverStationCIO_DigitalIn = 2,
|
||||
kDriverStationCIO_DigitalOut = 3,
|
||||
|
||||
kDriverStationEIO_Acceleration = 1,
|
||||
kDriverStationEIO_AnalogIn = 2,
|
||||
kDriverStationEIO_AnalogOut = 3,
|
||||
kDriverStationEIO_Button = 4,
|
||||
kDriverStationEIO_LED = 5,
|
||||
kDriverStationEIO_DigitalIn = 6,
|
||||
kDriverStationEIO_DigitalOut = 7,
|
||||
kDriverStationEIO_FixedDigitalOut = 8,
|
||||
kDriverStationEIO_PWM = 9,
|
||||
kDriverStationEIO_Encoder = 10,
|
||||
kDriverStationEIO_TouchSlider = 11,
|
||||
|
||||
kADXL345_SPI = 1,
|
||||
kADXL345_I2C = 2,
|
||||
|
||||
kCommand_Scheduler = 1,
|
||||
|
||||
kSmartDashboard_Instance = 1,
|
||||
} tInstances;
|
||||
|
||||
/**
|
||||
* Report the usage of a resource of interest.
|
||||
*
|
||||
* @param resource one of the values in the tResourceType above (max value 51).
|
||||
* @param instanceNumber an index that identifies the resource instance.
|
||||
* @param context an optional additional context number for some cases (such as module number). Set to 0 to omit.
|
||||
* @param feature a string to be included describing features in use on a specific resource. Setting the same resource more than once allows you to change the feature string.
|
||||
*/
|
||||
uint32_t EXPORT_FUNC report(tResourceType resource, uint8_t instanceNumber, uint8_t context = 0, const char *feature = NULL);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
uint32_t EXPORT_FUNC FRC_NetworkCommunication_nUsageReporting_report(uint8_t resource, uint8_t instanceNumber, uint8_t context, const char *feature);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __UsageReporting_h__
|
||||
@@ -18,6 +18,14 @@ ext {
|
||||
skipDev = true
|
||||
}
|
||||
|
||||
ext {
|
||||
chipObjectComponents = ['myRobotCpp', 'myRobotCppStatic']
|
||||
netCommComponents = ['myRobotCpp', 'myRobotCppStatic']
|
||||
useNiJava = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
|
||||
apply from: "${rootDir}/shared/opencv.gradle"
|
||||
|
||||
mainClassName = 'Main'
|
||||
@@ -61,10 +69,9 @@ model {
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(binary, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
}
|
||||
}
|
||||
myRobotCppStatic(NativeExecutableSpec) {
|
||||
@@ -85,10 +92,9 @@ model {
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'static'
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'static'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'static'
|
||||
lib project: ':hal', library: 'hal', linkage: 'static'
|
||||
project(':hal').addHalDependency(binary, 'static')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'static'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'static'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
libFRC_NetworkCommunication.so - \usr\local\frc\lib
|
||||
libi2c.so - \usr\local\frc\lib
|
||||
libNiFpga.so - \usr\local\natinst\lib
|
||||
libNiFpgaLv.so - \usr\local\natinst\lib
|
||||
libniriodevenum.so - \usr\local\natinst\lib
|
||||
libniriosession.so - \usr\local\natinst\lib
|
||||
libNiRioSrv.so - \usr\local\natinst\lib
|
||||
libRoboRIO_FRC_ChipObject.so - \usr\local\frc\lib
|
||||
libspi.so - \usr\local\frc\lib
|
||||
libvisa.so - \usr\local\vxipnp\linux\lib\
|
||||
@@ -1,111 +0,0 @@
|
||||
import edu.wpi.first.nativeutils.*
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
import org.apache.tools.ant.filters.*;
|
||||
|
||||
public class NiDependencySet implements NativeDependencySet {
|
||||
private Project m_project
|
||||
|
||||
public NiDependencySet(Project project) {
|
||||
m_project = project
|
||||
}
|
||||
|
||||
public FileCollection getIncludeRoots() {
|
||||
return m_project.files("${m_project.projectDir}/include")
|
||||
}
|
||||
|
||||
private FileCollection getFiles() {
|
||||
def f = m_project.fileTree("${m_project.projectDir}/lib").filter { it.isFile() }
|
||||
return f
|
||||
}
|
||||
|
||||
public FileCollection getLinkFiles() {
|
||||
return getFiles()
|
||||
}
|
||||
|
||||
public FileCollection getRuntimeFiles() {
|
||||
return m_project.files()
|
||||
}
|
||||
}
|
||||
|
||||
ext.addNiLibrariesToLinker = { binary ->
|
||||
if (binary.targetPlatform.architecture.name == 'athena') {
|
||||
binary.lib(new NiDependencySet(project))
|
||||
}
|
||||
}
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
def niLibBaseName = '_GROUP_edu_wpi_first_ni-libraries_ID_ni-libraries_CLS'
|
||||
|
||||
task libZip(type: Zip) {
|
||||
destinationDir = outputsFolder
|
||||
baseName = niLibBaseName
|
||||
classifier = "linuxathena"
|
||||
|
||||
from('lib') {
|
||||
into '/linux/athena/shared/'
|
||||
}
|
||||
}
|
||||
|
||||
task headersZip(type: Zip) {
|
||||
destinationDir = outputsFolder
|
||||
baseName = niLibBaseName
|
||||
classifier = "headers"
|
||||
|
||||
from('include') {
|
||||
into '/'
|
||||
}
|
||||
}
|
||||
|
||||
task build() {}
|
||||
|
||||
build.dependsOn headersZip
|
||||
build.dependsOn libZip
|
||||
|
||||
addTaskToCopyAllOutputs(headersZip)
|
||||
addTaskToCopyAllOutputs(libZip)
|
||||
|
||||
apply from: 'publish.gradle'
|
||||
|
||||
task patchNiLibraries() {
|
||||
doLast {
|
||||
// Patch ChipObject headers to be self contained
|
||||
FileTree chipTree = fileTree(dir: "$rootDir/ni-libraries/include/FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace")
|
||||
chipTree.each { File file ->
|
||||
String contents = file.getText('UTF-8')
|
||||
contents = contents.replaceAll('#include \"tSystemInterface.h\"', '#include \"../tSystem.h\"\n#include \"../tSystemInterface.h\"')
|
||||
file.write(contents, 'UTF-8')
|
||||
}
|
||||
|
||||
// Patch NetComm headers to work on Windows
|
||||
FileTree netTree = fileTree(dir: "$rootDir/ni-libraries/include/FRC_NetworkCommunication")
|
||||
netTree.each { File file ->
|
||||
String contents = file.getText('UTF-8')
|
||||
contents = contents.replaceAll('#ifdef WIN32', '#ifdef _WIN32')
|
||||
contents = contents.replaceAll('# include <vxWorks_compat.h>', '#include <windows.h>')
|
||||
contents = contents.replaceAll('#include <vxWorks_compat.h>', '#include <windows.h>')
|
||||
file.write(contents, 'UTF-8')
|
||||
}
|
||||
|
||||
FileTree allTree = fileTree(dir: "$rootDir/ni-libraries/include/")
|
||||
allTree.each { File file ->
|
||||
String contents = file.getText('UTF-8')
|
||||
contents = contents.replaceAll('\r\n', '\n')
|
||||
file.write(contents, 'UTF-8')
|
||||
}
|
||||
|
||||
// Move UsageReporting header to the HAL, because it is necessary for our
|
||||
// UsageReporting in WPILibC.
|
||||
|
||||
copy {
|
||||
from("$rootDir/ni-libraries/include/FRC_NetworkCommunication") {
|
||||
include 'UsageReporting.h'
|
||||
}
|
||||
into "$rootDir/hal/src/main/native/include/HAL"
|
||||
}
|
||||
|
||||
delete {
|
||||
delete "$rootDir/ni-libraries/include/FRC_NetworkCommunication/UsageReporting.h"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __RoboRIO_FRC_ChipObject_Aliases_h__
|
||||
#define __RoboRIO_FRC_ChipObject_Aliases_h__
|
||||
|
||||
#define nRoboRIO_FPGANamespace nFRC_2018_18_0_8
|
||||
|
||||
#endif // __RoboRIO_FRC_ChipObject_Aliases_h__
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_nInterfaceGlobals_h__
|
||||
#define __nFRC_2018_18_0_8_nInterfaceGlobals_h__
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
extern unsigned int g_currentTargetClass;
|
||||
|
||||
static const int g_SpiAutoData_index = 0;
|
||||
static const int g_DMA_index = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_nInterfaceGlobals_h__
|
||||
@@ -1,144 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_AI_h__
|
||||
#define __nFRC_2018_18_0_8_AI_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tAI
|
||||
{
|
||||
public:
|
||||
tAI(){}
|
||||
virtual ~tAI(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tAI* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned ScanSize : 3;
|
||||
unsigned ConvertRate : 26;
|
||||
#else
|
||||
unsigned ConvertRate : 26;
|
||||
unsigned ScanSize : 3;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 29;
|
||||
};
|
||||
} tConfig;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Channel : 3;
|
||||
unsigned Averaged : 1;
|
||||
#else
|
||||
unsigned Averaged : 1;
|
||||
unsigned Channel : 3;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 4;
|
||||
};
|
||||
} tReadSelect;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tOutput_IfaceConstants;
|
||||
|
||||
virtual signed int readOutput(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tConfig_IfaceConstants;
|
||||
|
||||
virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_ScanSize(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_ConvertRate(unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual tConfig readConfig(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_ScanSize(tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readConfig_ConvertRate(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tLoopTiming_IfaceConstants;
|
||||
|
||||
virtual unsigned int readLoopTiming(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumOversampleBitsElements = 8,
|
||||
} tOversampleBits_IfaceConstants;
|
||||
|
||||
virtual void writeOversampleBits(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readOversampleBits(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumAverageBitsElements = 8,
|
||||
} tAverageBits_IfaceConstants;
|
||||
|
||||
virtual void writeAverageBits(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readAverageBits(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumScanListElements = 8,
|
||||
} tScanList_IfaceConstants;
|
||||
|
||||
virtual void writeScanList(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readScanList(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tLatchOutput_IfaceConstants;
|
||||
|
||||
virtual void strobeLatchOutput(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tReadSelect_IfaceConstants;
|
||||
|
||||
virtual void writeReadSelect(tReadSelect value, tRioStatusCode *status) = 0;
|
||||
virtual void writeReadSelect_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeReadSelect_Averaged(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tReadSelect readReadSelect(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readReadSelect_Channel(tRioStatusCode *status) = 0;
|
||||
virtual bool readReadSelect_Averaged(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tAI(const tAI&);
|
||||
void operator=(const tAI&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_AI_h__
|
||||
@@ -1,51 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_AO_h__
|
||||
#define __nFRC_2018_18_0_8_AO_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tAO
|
||||
{
|
||||
public:
|
||||
tAO(){}
|
||||
virtual ~tAO(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tAO* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumMXPRegisters = 2,
|
||||
} tMXP_IfaceConstants;
|
||||
|
||||
virtual void writeMXP(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readMXP(unsigned char reg_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
private:
|
||||
tAO(const tAO&);
|
||||
void operator=(const tAO&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_AO_h__
|
||||
@@ -1,103 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Accel_h__
|
||||
#define __nFRC_2018_18_0_8_Accel_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tAccel
|
||||
{
|
||||
public:
|
||||
tAccel(){}
|
||||
virtual ~tAccel(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tAccel* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tSTAT_IfaceConstants;
|
||||
|
||||
virtual unsigned char readSTAT(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDATO_IfaceConstants;
|
||||
|
||||
virtual void writeDATO(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readDATO(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tCNTR_IfaceConstants;
|
||||
|
||||
virtual void writeCNTR(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readCNTR(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tCNFG_IfaceConstants;
|
||||
|
||||
virtual void writeCNFG(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readCNFG(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tCNTL_IfaceConstants;
|
||||
|
||||
virtual void writeCNTL(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readCNTL(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDATI_IfaceConstants;
|
||||
|
||||
virtual unsigned char readDATI(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tGO_IfaceConstants;
|
||||
|
||||
virtual void strobeGO(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tADDR_IfaceConstants;
|
||||
|
||||
virtual void writeADDR(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readADDR(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tAccel(const tAccel&);
|
||||
void operator=(const tAccel&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Accel_h__
|
||||
@@ -1,88 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Accumulator_h__
|
||||
#define __nFRC_2018_18_0_8_Accumulator_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tAccumulator
|
||||
{
|
||||
public:
|
||||
tAccumulator(){}
|
||||
virtual ~tAccumulator(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tAccumulator* create(unsigned char sys_index, tRioStatusCode *status);
|
||||
virtual unsigned char getSystemIndex() = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 2,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
signed long long Value;
|
||||
unsigned Count : 32;
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
unsigned value2 : 32;
|
||||
unsigned value3 : 32;
|
||||
};
|
||||
} tOutput;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tOutput_IfaceConstants;
|
||||
|
||||
virtual tOutput readOutput(tRioStatusCode *status) = 0;
|
||||
virtual signed long long readOutput_Value(tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readOutput_Count(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tCenter_IfaceConstants;
|
||||
|
||||
virtual void writeCenter(signed int value, tRioStatusCode *status) = 0;
|
||||
virtual signed int readCenter(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDeadband_IfaceConstants;
|
||||
|
||||
virtual void writeDeadband(signed int value, tRioStatusCode *status) = 0;
|
||||
virtual signed int readDeadband(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tReset_IfaceConstants;
|
||||
|
||||
virtual void strobeReset(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tAccumulator(const tAccumulator&);
|
||||
void operator=(const tAccumulator&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Accumulator_h__
|
||||
@@ -1,58 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Alarm_h__
|
||||
#define __nFRC_2018_18_0_8_Alarm_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tAlarm
|
||||
{
|
||||
public:
|
||||
tAlarm(){}
|
||||
virtual ~tAlarm(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tAlarm* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tEnable_IfaceConstants;
|
||||
|
||||
virtual void writeEnable(bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readEnable(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tTriggerTime_IfaceConstants;
|
||||
|
||||
virtual void writeTriggerTime(unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readTriggerTime(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tAlarm(const tAlarm&);
|
||||
void operator=(const tAlarm&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Alarm_h__
|
||||
@@ -1,130 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_AnalogTrigger_h__
|
||||
#define __nFRC_2018_18_0_8_AnalogTrigger_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tAnalogTrigger
|
||||
{
|
||||
public:
|
||||
tAnalogTrigger(){}
|
||||
virtual ~tAnalogTrigger(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tAnalogTrigger* create(unsigned char sys_index, tRioStatusCode *status);
|
||||
virtual unsigned char getSystemIndex() = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 8,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned InHysteresis : 1;
|
||||
unsigned OverLimit : 1;
|
||||
unsigned Rising : 1;
|
||||
unsigned Falling : 1;
|
||||
#else
|
||||
unsigned Falling : 1;
|
||||
unsigned Rising : 1;
|
||||
unsigned OverLimit : 1;
|
||||
unsigned InHysteresis : 1;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 4;
|
||||
};
|
||||
} tOutput;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Channel : 3;
|
||||
unsigned Averaged : 1;
|
||||
unsigned Filter : 1;
|
||||
unsigned FloatingRollover : 1;
|
||||
signed RolloverLimit : 8;
|
||||
#else
|
||||
signed RolloverLimit : 8;
|
||||
unsigned FloatingRollover : 1;
|
||||
unsigned Filter : 1;
|
||||
unsigned Averaged : 1;
|
||||
unsigned Channel : 3;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 14;
|
||||
};
|
||||
} tSourceSelect;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tSourceSelect_IfaceConstants;
|
||||
|
||||
virtual void writeSourceSelect(tSourceSelect value, tRioStatusCode *status) = 0;
|
||||
virtual void writeSourceSelect_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeSourceSelect_Averaged(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeSourceSelect_Filter(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeSourceSelect_FloatingRollover(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeSourceSelect_RolloverLimit(signed short value, tRioStatusCode *status) = 0;
|
||||
virtual tSourceSelect readSourceSelect(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readSourceSelect_Channel(tRioStatusCode *status) = 0;
|
||||
virtual bool readSourceSelect_Averaged(tRioStatusCode *status) = 0;
|
||||
virtual bool readSourceSelect_Filter(tRioStatusCode *status) = 0;
|
||||
virtual bool readSourceSelect_FloatingRollover(tRioStatusCode *status) = 0;
|
||||
virtual signed short readSourceSelect_RolloverLimit(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tUpperLimit_IfaceConstants;
|
||||
|
||||
virtual void writeUpperLimit(signed int value, tRioStatusCode *status) = 0;
|
||||
virtual signed int readUpperLimit(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tLowerLimit_IfaceConstants;
|
||||
|
||||
virtual void writeLowerLimit(signed int value, tRioStatusCode *status) = 0;
|
||||
virtual signed int readLowerLimit(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumOutputElements = 8,
|
||||
} tOutput_IfaceConstants;
|
||||
|
||||
virtual tOutput readOutput(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual bool readOutput_InHysteresis(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual bool readOutput_OverLimit(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual bool readOutput_Rising(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual bool readOutput_Falling(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tAnalogTrigger(const tAnalogTrigger&);
|
||||
void operator=(const tAnalogTrigger&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_AnalogTrigger_h__
|
||||
@@ -1,91 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_BIST_h__
|
||||
#define __nFRC_2018_18_0_8_BIST_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tBIST
|
||||
{
|
||||
public:
|
||||
tBIST(){}
|
||||
virtual ~tBIST(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tBIST* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDO0SquareTicks_IfaceConstants;
|
||||
|
||||
virtual void writeDO0SquareTicks(unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readDO0SquareTicks(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tEnable_IfaceConstants;
|
||||
|
||||
virtual void writeEnable(bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readEnable(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDO1SquareEnable_IfaceConstants;
|
||||
|
||||
virtual void writeDO1SquareEnable(bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readDO1SquareEnable(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDO0SquareEnable_IfaceConstants;
|
||||
|
||||
virtual void writeDO0SquareEnable(bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readDO0SquareEnable(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDO1SquareTicks_IfaceConstants;
|
||||
|
||||
virtual void writeDO1SquareTicks(unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readDO1SquareTicks(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumDORegisters = 2,
|
||||
} tDO_IfaceConstants;
|
||||
|
||||
virtual void writeDO(unsigned char reg_index, bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readDO(unsigned char reg_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
private:
|
||||
tBIST(const tBIST&);
|
||||
void operator=(const tBIST&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_BIST_h__
|
||||
@@ -1,220 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Counter_h__
|
||||
#define __nFRC_2018_18_0_8_Counter_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tCounter
|
||||
{
|
||||
public:
|
||||
tCounter(){}
|
||||
virtual ~tCounter(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tCounter* create(unsigned char sys_index, tRioStatusCode *status);
|
||||
virtual unsigned char getSystemIndex() = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 8,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Direction : 1;
|
||||
signed Value : 31;
|
||||
#else
|
||||
signed Value : 31;
|
||||
unsigned Direction : 1;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tOutput;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned UpSource_Channel : 4;
|
||||
unsigned UpSource_Module : 1;
|
||||
unsigned UpSource_AnalogTrigger : 1;
|
||||
unsigned DownSource_Channel : 4;
|
||||
unsigned DownSource_Module : 1;
|
||||
unsigned DownSource_AnalogTrigger : 1;
|
||||
unsigned IndexSource_Channel : 4;
|
||||
unsigned IndexSource_Module : 1;
|
||||
unsigned IndexSource_AnalogTrigger : 1;
|
||||
unsigned IndexActiveHigh : 1;
|
||||
unsigned IndexEdgeSensitive : 1;
|
||||
unsigned UpRisingEdge : 1;
|
||||
unsigned UpFallingEdge : 1;
|
||||
unsigned DownRisingEdge : 1;
|
||||
unsigned DownFallingEdge : 1;
|
||||
unsigned Mode : 2;
|
||||
unsigned PulseLengthThreshold : 6;
|
||||
#else
|
||||
unsigned PulseLengthThreshold : 6;
|
||||
unsigned Mode : 2;
|
||||
unsigned DownFallingEdge : 1;
|
||||
unsigned DownRisingEdge : 1;
|
||||
unsigned UpFallingEdge : 1;
|
||||
unsigned UpRisingEdge : 1;
|
||||
unsigned IndexEdgeSensitive : 1;
|
||||
unsigned IndexActiveHigh : 1;
|
||||
unsigned IndexSource_AnalogTrigger : 1;
|
||||
unsigned IndexSource_Module : 1;
|
||||
unsigned IndexSource_Channel : 4;
|
||||
unsigned DownSource_AnalogTrigger : 1;
|
||||
unsigned DownSource_Module : 1;
|
||||
unsigned DownSource_Channel : 4;
|
||||
unsigned UpSource_AnalogTrigger : 1;
|
||||
unsigned UpSource_Module : 1;
|
||||
unsigned UpSource_Channel : 4;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tConfig;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Period : 23;
|
||||
signed Count : 8;
|
||||
unsigned Stalled : 1;
|
||||
#else
|
||||
unsigned Stalled : 1;
|
||||
signed Count : 8;
|
||||
unsigned Period : 23;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tTimerOutput;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned StallPeriod : 24;
|
||||
unsigned AverageSize : 7;
|
||||
unsigned UpdateWhenEmpty : 1;
|
||||
#else
|
||||
unsigned UpdateWhenEmpty : 1;
|
||||
unsigned AverageSize : 7;
|
||||
unsigned StallPeriod : 24;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tTimerConfig;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tOutput_IfaceConstants;
|
||||
|
||||
virtual tOutput readOutput(tRioStatusCode *status) = 0;
|
||||
virtual bool readOutput_Direction(tRioStatusCode *status) = 0;
|
||||
virtual signed int readOutput_Value(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tConfig_IfaceConstants;
|
||||
|
||||
virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_UpSource_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_UpSource_Module(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_UpSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_DownSource_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_DownSource_Module(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_DownSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexSource_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexSource_Module(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexActiveHigh(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexEdgeSensitive(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_UpRisingEdge(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_UpFallingEdge(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_DownRisingEdge(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_DownFallingEdge(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Mode(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_PulseLengthThreshold(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual tConfig readConfig(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_UpSource_Channel(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_UpSource_Module(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_UpSource_AnalogTrigger(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_DownSource_Channel(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_DownSource_Module(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_DownSource_AnalogTrigger(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_IndexSource_Channel(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_IndexSource_Module(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_IndexSource_AnalogTrigger(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_IndexActiveHigh(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_IndexEdgeSensitive(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_UpRisingEdge(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_UpFallingEdge(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_DownRisingEdge(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_DownFallingEdge(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_Mode(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readConfig_PulseLengthThreshold(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tTimerOutput_IfaceConstants;
|
||||
|
||||
virtual tTimerOutput readTimerOutput(tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readTimerOutput_Period(tRioStatusCode *status) = 0;
|
||||
virtual signed char readTimerOutput_Count(tRioStatusCode *status) = 0;
|
||||
virtual bool readTimerOutput_Stalled(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tReset_IfaceConstants;
|
||||
|
||||
virtual void strobeReset(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tTimerConfig_IfaceConstants;
|
||||
|
||||
virtual void writeTimerConfig(tTimerConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeTimerConfig_StallPeriod(unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual void writeTimerConfig_AverageSize(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeTimerConfig_UpdateWhenEmpty(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tTimerConfig readTimerConfig(tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readTimerConfig_StallPeriod(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readTimerConfig_AverageSize(tRioStatusCode *status) = 0;
|
||||
virtual bool readTimerConfig_UpdateWhenEmpty(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tCounter(const tCounter&);
|
||||
void operator=(const tCounter&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Counter_h__
|
||||
@@ -1,264 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_DIO_h__
|
||||
#define __nFRC_2018_18_0_8_DIO_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tDIO
|
||||
{
|
||||
public:
|
||||
tDIO(){}
|
||||
virtual ~tDIO(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tDIO* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Headers : 10;
|
||||
unsigned SPIPort : 5;
|
||||
unsigned Reserved : 1;
|
||||
unsigned MXP : 16;
|
||||
#else
|
||||
unsigned MXP : 16;
|
||||
unsigned Reserved : 1;
|
||||
unsigned SPIPort : 5;
|
||||
unsigned Headers : 10;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tDO;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Headers : 10;
|
||||
unsigned SPIPort : 5;
|
||||
unsigned Reserved : 1;
|
||||
unsigned MXP : 16;
|
||||
#else
|
||||
unsigned MXP : 16;
|
||||
unsigned Reserved : 1;
|
||||
unsigned SPIPort : 5;
|
||||
unsigned Headers : 10;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tOutputEnable;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Headers : 10;
|
||||
unsigned SPIPort : 5;
|
||||
unsigned Reserved : 1;
|
||||
unsigned MXP : 16;
|
||||
#else
|
||||
unsigned MXP : 16;
|
||||
unsigned Reserved : 1;
|
||||
unsigned SPIPort : 5;
|
||||
unsigned Headers : 10;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tPulse;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Headers : 10;
|
||||
unsigned SPIPort : 5;
|
||||
unsigned Reserved : 1;
|
||||
unsigned MXP : 16;
|
||||
#else
|
||||
unsigned MXP : 16;
|
||||
unsigned Reserved : 1;
|
||||
unsigned SPIPort : 5;
|
||||
unsigned Headers : 10;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tDI;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDO_IfaceConstants;
|
||||
|
||||
virtual void writeDO(tDO value, tRioStatusCode *status) = 0;
|
||||
virtual void writeDO_Headers(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual void writeDO_SPIPort(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeDO_Reserved(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeDO_MXP(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual tDO readDO(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readDO_Headers(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readDO_SPIPort(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readDO_Reserved(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readDO_MXP(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumPWMDutyCycleAElements = 4,
|
||||
} tPWMDutyCycleA_IfaceConstants;
|
||||
|
||||
virtual void writePWMDutyCycleA(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readPWMDutyCycleA(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumPWMDutyCycleBElements = 2,
|
||||
} tPWMDutyCycleB_IfaceConstants;
|
||||
|
||||
virtual void writePWMDutyCycleB(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readPWMDutyCycleB(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumFilterSelectHdrElements = 16,
|
||||
} tFilterSelectHdr_IfaceConstants;
|
||||
|
||||
virtual void writeFilterSelectHdr(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readFilterSelectHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tOutputEnable_IfaceConstants;
|
||||
|
||||
virtual void writeOutputEnable(tOutputEnable value, tRioStatusCode *status) = 0;
|
||||
virtual void writeOutputEnable_Headers(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual void writeOutputEnable_SPIPort(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeOutputEnable_Reserved(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeOutputEnable_MXP(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual tOutputEnable readOutputEnable(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readOutputEnable_Headers(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readOutputEnable_SPIPort(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readOutputEnable_Reserved(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readOutputEnable_MXP(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumPWMOutputSelectElements = 6,
|
||||
} tPWMOutputSelect_IfaceConstants;
|
||||
|
||||
virtual void writePWMOutputSelect(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readPWMOutputSelect(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tPulse_IfaceConstants;
|
||||
|
||||
virtual void writePulse(tPulse value, tRioStatusCode *status) = 0;
|
||||
virtual void writePulse_Headers(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual void writePulse_SPIPort(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writePulse_Reserved(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writePulse_MXP(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual tPulse readPulse(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readPulse_Headers(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readPulse_SPIPort(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readPulse_Reserved(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readPulse_MXP(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDI_IfaceConstants;
|
||||
|
||||
virtual tDI readDI(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readDI_Headers(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readDI_SPIPort(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readDI_Reserved(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readDI_MXP(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tEnableMXPSpecialFunction_IfaceConstants;
|
||||
|
||||
virtual void writeEnableMXPSpecialFunction(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readEnableMXPSpecialFunction(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumFilterSelectMXPElements = 16,
|
||||
} tFilterSelectMXP_IfaceConstants;
|
||||
|
||||
virtual void writeFilterSelectMXP(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readFilterSelectMXP(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tPulseLength_IfaceConstants;
|
||||
|
||||
virtual void writePulseLength(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readPulseLength(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tPWMPeriodPower_IfaceConstants;
|
||||
|
||||
virtual void writePWMPeriodPower(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readPWMPeriodPower(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumFilterPeriodMXPRegisters = 3,
|
||||
} tFilterPeriodMXP_IfaceConstants;
|
||||
|
||||
virtual void writeFilterPeriodMXP(unsigned char reg_index, unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readFilterPeriodMXP(unsigned char reg_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumFilterPeriodHdrRegisters = 3,
|
||||
} tFilterPeriodHdr_IfaceConstants;
|
||||
|
||||
virtual void writeFilterPeriodHdr(unsigned char reg_index, unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readFilterPeriodHdr(unsigned char reg_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
private:
|
||||
tDIO(const tDIO&);
|
||||
void operator=(const tDIO&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_DIO_h__
|
||||
@@ -1,198 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_DMA_h__
|
||||
#define __nFRC_2018_18_0_8_DMA_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tDMA
|
||||
{
|
||||
public:
|
||||
tDMA(){}
|
||||
virtual ~tDMA(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tDMA* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Pause : 1;
|
||||
unsigned Enable_AI0_Low : 1;
|
||||
unsigned Enable_AI0_High : 1;
|
||||
unsigned Enable_AIAveraged0_Low : 1;
|
||||
unsigned Enable_AIAveraged0_High : 1;
|
||||
unsigned Enable_AI1_Low : 1;
|
||||
unsigned Enable_AI1_High : 1;
|
||||
unsigned Enable_AIAveraged1_Low : 1;
|
||||
unsigned Enable_AIAveraged1_High : 1;
|
||||
unsigned Enable_Accumulator0 : 1;
|
||||
unsigned Enable_Accumulator1 : 1;
|
||||
unsigned Enable_DI : 1;
|
||||
unsigned Enable_AnalogTriggers : 1;
|
||||
unsigned Enable_Counters_Low : 1;
|
||||
unsigned Enable_Counters_High : 1;
|
||||
unsigned Enable_CounterTimers_Low : 1;
|
||||
unsigned Enable_CounterTimers_High : 1;
|
||||
unsigned Enable_Encoders_Low : 1;
|
||||
unsigned Enable_Encoders_High : 1;
|
||||
unsigned Enable_EncoderTimers_Low : 1;
|
||||
unsigned Enable_EncoderTimers_High : 1;
|
||||
unsigned ExternalClock : 1;
|
||||
#else
|
||||
unsigned ExternalClock : 1;
|
||||
unsigned Enable_EncoderTimers_High : 1;
|
||||
unsigned Enable_EncoderTimers_Low : 1;
|
||||
unsigned Enable_Encoders_High : 1;
|
||||
unsigned Enable_Encoders_Low : 1;
|
||||
unsigned Enable_CounterTimers_High : 1;
|
||||
unsigned Enable_CounterTimers_Low : 1;
|
||||
unsigned Enable_Counters_High : 1;
|
||||
unsigned Enable_Counters_Low : 1;
|
||||
unsigned Enable_AnalogTriggers : 1;
|
||||
unsigned Enable_DI : 1;
|
||||
unsigned Enable_Accumulator1 : 1;
|
||||
unsigned Enable_Accumulator0 : 1;
|
||||
unsigned Enable_AIAveraged1_High : 1;
|
||||
unsigned Enable_AIAveraged1_Low : 1;
|
||||
unsigned Enable_AI1_High : 1;
|
||||
unsigned Enable_AI1_Low : 1;
|
||||
unsigned Enable_AIAveraged0_High : 1;
|
||||
unsigned Enable_AIAveraged0_Low : 1;
|
||||
unsigned Enable_AI0_High : 1;
|
||||
unsigned Enable_AI0_Low : 1;
|
||||
unsigned Pause : 1;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 22;
|
||||
};
|
||||
} tConfig;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned ExternalClockSource_Channel : 4;
|
||||
unsigned ExternalClockSource_Module : 1;
|
||||
unsigned ExternalClockSource_AnalogTrigger : 1;
|
||||
unsigned RisingEdge : 1;
|
||||
unsigned FallingEdge : 1;
|
||||
#else
|
||||
unsigned FallingEdge : 1;
|
||||
unsigned RisingEdge : 1;
|
||||
unsigned ExternalClockSource_AnalogTrigger : 1;
|
||||
unsigned ExternalClockSource_Module : 1;
|
||||
unsigned ExternalClockSource_Channel : 4;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 8;
|
||||
};
|
||||
} tExternalTriggers;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tRate_IfaceConstants;
|
||||
|
||||
virtual void writeRate(unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readRate(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tConfig_IfaceConstants;
|
||||
|
||||
virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Pause(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AI0_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AI0_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AIAveraged0_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AIAveraged0_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AI1_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AI1_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AIAveraged1_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AIAveraged1_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_Accumulator0(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_Accumulator1(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_DI(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_AnalogTriggers(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_Counters_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_Counters_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_CounterTimers_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_CounterTimers_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_Encoders_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_Encoders_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_EncoderTimers_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enable_EncoderTimers_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_ExternalClock(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tConfig readConfig(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Pause(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AI0_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AI0_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AIAveraged0_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AIAveraged0_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AI1_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AI1_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AIAveraged1_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AIAveraged1_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_Accumulator0(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_Accumulator1(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_DI(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_AnalogTriggers(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_Counters_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_Counters_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_CounterTimers_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_CounterTimers_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_Encoders_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_Encoders_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_EncoderTimers_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enable_EncoderTimers_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_ExternalClock(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumExternalTriggersRegisters = 2,
|
||||
kNumExternalTriggersElements = 4,
|
||||
} tExternalTriggers_IfaceConstants;
|
||||
|
||||
virtual void writeExternalTriggers(unsigned char reg_index, unsigned char bitfield_index, tExternalTriggers value, tRioStatusCode *status) = 0;
|
||||
virtual void writeExternalTriggers_ExternalClockSource_Channel(unsigned char reg_index, unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeExternalTriggers_ExternalClockSource_Module(unsigned char reg_index, unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeExternalTriggers_ExternalClockSource_AnalogTrigger(unsigned char reg_index, unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeExternalTriggers_RisingEdge(unsigned char reg_index, unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeExternalTriggers_FallingEdge(unsigned char reg_index, unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0;
|
||||
virtual tExternalTriggers readExternalTriggers(unsigned char reg_index, unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readExternalTriggers_ExternalClockSource_Channel(unsigned char reg_index, unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readExternalTriggers_ExternalClockSource_Module(unsigned char reg_index, unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual bool readExternalTriggers_ExternalClockSource_AnalogTrigger(unsigned char reg_index, unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual bool readExternalTriggers_RisingEdge(unsigned char reg_index, unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
virtual bool readExternalTriggers_FallingEdge(unsigned char reg_index, unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
private:
|
||||
tDMA(const tDMA&);
|
||||
void operator=(const tDMA&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_DMA_h__
|
||||
@@ -1,200 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Encoder_h__
|
||||
#define __nFRC_2018_18_0_8_Encoder_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tEncoder
|
||||
{
|
||||
public:
|
||||
tEncoder(){}
|
||||
virtual ~tEncoder(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tEncoder* create(unsigned char sys_index, tRioStatusCode *status);
|
||||
virtual unsigned char getSystemIndex() = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 8,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Direction : 1;
|
||||
signed Value : 31;
|
||||
#else
|
||||
signed Value : 31;
|
||||
unsigned Direction : 1;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tOutput;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned ASource_Channel : 4;
|
||||
unsigned ASource_Module : 1;
|
||||
unsigned ASource_AnalogTrigger : 1;
|
||||
unsigned BSource_Channel : 4;
|
||||
unsigned BSource_Module : 1;
|
||||
unsigned BSource_AnalogTrigger : 1;
|
||||
unsigned IndexSource_Channel : 4;
|
||||
unsigned IndexSource_Module : 1;
|
||||
unsigned IndexSource_AnalogTrigger : 1;
|
||||
unsigned IndexActiveHigh : 1;
|
||||
unsigned IndexEdgeSensitive : 1;
|
||||
unsigned Reverse : 1;
|
||||
#else
|
||||
unsigned Reverse : 1;
|
||||
unsigned IndexEdgeSensitive : 1;
|
||||
unsigned IndexActiveHigh : 1;
|
||||
unsigned IndexSource_AnalogTrigger : 1;
|
||||
unsigned IndexSource_Module : 1;
|
||||
unsigned IndexSource_Channel : 4;
|
||||
unsigned BSource_AnalogTrigger : 1;
|
||||
unsigned BSource_Module : 1;
|
||||
unsigned BSource_Channel : 4;
|
||||
unsigned ASource_AnalogTrigger : 1;
|
||||
unsigned ASource_Module : 1;
|
||||
unsigned ASource_Channel : 4;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 21;
|
||||
};
|
||||
} tConfig;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Period : 23;
|
||||
signed Count : 8;
|
||||
unsigned Stalled : 1;
|
||||
#else
|
||||
unsigned Stalled : 1;
|
||||
signed Count : 8;
|
||||
unsigned Period : 23;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tTimerOutput;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned StallPeriod : 24;
|
||||
unsigned AverageSize : 7;
|
||||
unsigned UpdateWhenEmpty : 1;
|
||||
#else
|
||||
unsigned UpdateWhenEmpty : 1;
|
||||
unsigned AverageSize : 7;
|
||||
unsigned StallPeriod : 24;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tTimerConfig;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tOutput_IfaceConstants;
|
||||
|
||||
virtual tOutput readOutput(tRioStatusCode *status) = 0;
|
||||
virtual bool readOutput_Direction(tRioStatusCode *status) = 0;
|
||||
virtual signed int readOutput_Value(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tConfig_IfaceConstants;
|
||||
|
||||
virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_ASource_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_ASource_Module(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_ASource_AnalogTrigger(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_BSource_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_BSource_Module(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_BSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexSource_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexSource_Module(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexActiveHigh(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_IndexEdgeSensitive(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Reverse(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tConfig readConfig(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_ASource_Channel(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_ASource_Module(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_ASource_AnalogTrigger(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_BSource_Channel(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_BSource_Module(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_BSource_AnalogTrigger(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_IndexSource_Channel(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_IndexSource_Module(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_IndexSource_AnalogTrigger(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_IndexActiveHigh(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_IndexEdgeSensitive(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Reverse(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tTimerOutput_IfaceConstants;
|
||||
|
||||
virtual tTimerOutput readTimerOutput(tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readTimerOutput_Period(tRioStatusCode *status) = 0;
|
||||
virtual signed char readTimerOutput_Count(tRioStatusCode *status) = 0;
|
||||
virtual bool readTimerOutput_Stalled(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tReset_IfaceConstants;
|
||||
|
||||
virtual void strobeReset(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tTimerConfig_IfaceConstants;
|
||||
|
||||
virtual void writeTimerConfig(tTimerConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeTimerConfig_StallPeriod(unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual void writeTimerConfig_AverageSize(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeTimerConfig_UpdateWhenEmpty(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tTimerConfig readTimerConfig(tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readTimerConfig_StallPeriod(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readTimerConfig_AverageSize(tRioStatusCode *status) = 0;
|
||||
virtual bool readTimerConfig_UpdateWhenEmpty(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tEncoder(const tEncoder&);
|
||||
void operator=(const tEncoder&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Encoder_h__
|
||||
@@ -1,108 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Global_h__
|
||||
#define __nFRC_2018_18_0_8_Global_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tGlobal
|
||||
{
|
||||
public:
|
||||
tGlobal(){}
|
||||
virtual ~tGlobal(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tGlobal* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Comm : 8;
|
||||
unsigned Mode : 8;
|
||||
unsigned RSL : 1;
|
||||
#else
|
||||
unsigned RSL : 1;
|
||||
unsigned Mode : 8;
|
||||
unsigned Comm : 8;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 17;
|
||||
};
|
||||
} tLEDs;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tLEDs_IfaceConstants;
|
||||
|
||||
virtual void writeLEDs(tLEDs value, tRioStatusCode *status) = 0;
|
||||
virtual void writeLEDs_Comm(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeLEDs_Mode(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeLEDs_RSL(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tLEDs readLEDs(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readLEDs_Comm(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readLEDs_Mode(tRioStatusCode *status) = 0;
|
||||
virtual bool readLEDs_RSL(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tLocalTimeUpper_IfaceConstants;
|
||||
|
||||
virtual unsigned int readLocalTimeUpper(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tVersion_IfaceConstants;
|
||||
|
||||
virtual unsigned short readVersion(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tLocalTime_IfaceConstants;
|
||||
|
||||
virtual unsigned int readLocalTime(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tUserButton_IfaceConstants;
|
||||
|
||||
virtual bool readUserButton(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tRevision_IfaceConstants;
|
||||
|
||||
virtual unsigned int readRevision(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tGlobal(const tGlobal&);
|
||||
void operator=(const tGlobal&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Global_h__
|
||||
@@ -1,149 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_HMB_h__
|
||||
#define __nFRC_2018_18_0_8_HMB_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tHMB
|
||||
{
|
||||
public:
|
||||
tHMB(){}
|
||||
virtual ~tHMB(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tHMB* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Enables_AI0_Low : 1;
|
||||
unsigned Enables_AI0_High : 1;
|
||||
unsigned Enables_AIAveraged0_Low : 1;
|
||||
unsigned Enables_AIAveraged0_High : 1;
|
||||
unsigned Enables_AI1_Low : 1;
|
||||
unsigned Enables_AI1_High : 1;
|
||||
unsigned Enables_AIAveraged1_Low : 1;
|
||||
unsigned Enables_AIAveraged1_High : 1;
|
||||
unsigned Enables_Accumulator0 : 1;
|
||||
unsigned Enables_Accumulator1 : 1;
|
||||
unsigned Enables_DI : 1;
|
||||
unsigned Enables_AnalogTriggers : 1;
|
||||
unsigned Enables_Counters_Low : 1;
|
||||
unsigned Enables_Counters_High : 1;
|
||||
unsigned Enables_CounterTimers_Low : 1;
|
||||
unsigned Enables_CounterTimers_High : 1;
|
||||
unsigned Enables_Encoders_Low : 1;
|
||||
unsigned Enables_Encoders_High : 1;
|
||||
unsigned Enables_EncoderTimers_Low : 1;
|
||||
unsigned Enables_EncoderTimers_High : 1;
|
||||
#else
|
||||
unsigned Enables_EncoderTimers_High : 1;
|
||||
unsigned Enables_EncoderTimers_Low : 1;
|
||||
unsigned Enables_Encoders_High : 1;
|
||||
unsigned Enables_Encoders_Low : 1;
|
||||
unsigned Enables_CounterTimers_High : 1;
|
||||
unsigned Enables_CounterTimers_Low : 1;
|
||||
unsigned Enables_Counters_High : 1;
|
||||
unsigned Enables_Counters_Low : 1;
|
||||
unsigned Enables_AnalogTriggers : 1;
|
||||
unsigned Enables_DI : 1;
|
||||
unsigned Enables_Accumulator1 : 1;
|
||||
unsigned Enables_Accumulator0 : 1;
|
||||
unsigned Enables_AIAveraged1_High : 1;
|
||||
unsigned Enables_AIAveraged1_Low : 1;
|
||||
unsigned Enables_AI1_High : 1;
|
||||
unsigned Enables_AI1_Low : 1;
|
||||
unsigned Enables_AIAveraged0_High : 1;
|
||||
unsigned Enables_AIAveraged0_Low : 1;
|
||||
unsigned Enables_AI0_High : 1;
|
||||
unsigned Enables_AI0_Low : 1;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 20;
|
||||
};
|
||||
} tConfig;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tForceOnce_IfaceConstants;
|
||||
|
||||
virtual void writeForceOnce(bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readForceOnce(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tConfig_IfaceConstants;
|
||||
|
||||
virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AI0_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AI0_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AIAveraged0_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AIAveraged0_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AI1_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AI1_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AIAveraged1_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AIAveraged1_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_Accumulator0(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_Accumulator1(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_DI(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_AnalogTriggers(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_Counters_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_Counters_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_CounterTimers_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_CounterTimers_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_Encoders_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_Encoders_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_EncoderTimers_Low(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Enables_EncoderTimers_High(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tConfig readConfig(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AI0_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AI0_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AIAveraged0_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AIAveraged0_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AI1_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AI1_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AIAveraged1_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AIAveraged1_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_Accumulator0(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_Accumulator1(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_DI(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_AnalogTriggers(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_Counters_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_Counters_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_CounterTimers_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_CounterTimers_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_Encoders_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_Encoders_High(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_EncoderTimers_Low(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Enables_EncoderTimers_High(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tHMB(const tHMB&);
|
||||
void operator=(const tHMB&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_HMB_h__
|
||||
@@ -1,101 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Interrupt_h__
|
||||
#define __nFRC_2018_18_0_8_Interrupt_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tInterrupt
|
||||
{
|
||||
public:
|
||||
tInterrupt(){}
|
||||
virtual ~tInterrupt(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tInterrupt* create(unsigned char sys_index, tRioStatusCode *status);
|
||||
virtual unsigned char getSystemIndex() = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 8,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Source_Channel : 4;
|
||||
unsigned Source_Module : 1;
|
||||
unsigned Source_AnalogTrigger : 1;
|
||||
unsigned RisingEdge : 1;
|
||||
unsigned FallingEdge : 1;
|
||||
unsigned WaitForAck : 1;
|
||||
#else
|
||||
unsigned WaitForAck : 1;
|
||||
unsigned FallingEdge : 1;
|
||||
unsigned RisingEdge : 1;
|
||||
unsigned Source_AnalogTrigger : 1;
|
||||
unsigned Source_Module : 1;
|
||||
unsigned Source_Channel : 4;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 9;
|
||||
};
|
||||
} tConfig;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tFallingTimeStamp_IfaceConstants;
|
||||
|
||||
virtual unsigned int readFallingTimeStamp(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tConfig_IfaceConstants;
|
||||
|
||||
virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Source_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Source_Module(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Source_AnalogTrigger(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_RisingEdge(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_FallingEdge(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_WaitForAck(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tConfig readConfig(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_Source_Channel(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readConfig_Source_Module(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_Source_AnalogTrigger(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_RisingEdge(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_FallingEdge(tRioStatusCode *status) = 0;
|
||||
virtual bool readConfig_WaitForAck(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tRisingTimeStamp_IfaceConstants;
|
||||
|
||||
virtual unsigned int readRisingTimeStamp(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tInterrupt(const tInterrupt&);
|
||||
void operator=(const tInterrupt&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Interrupt_h__
|
||||
@@ -1,135 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_PWM_h__
|
||||
#define __nFRC_2018_18_0_8_PWM_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tPWM
|
||||
{
|
||||
public:
|
||||
tPWM(){}
|
||||
virtual ~tPWM(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tPWM* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Period : 16;
|
||||
unsigned MinHigh : 16;
|
||||
#else
|
||||
unsigned MinHigh : 16;
|
||||
unsigned Period : 16;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tConfig;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tCycleStartTime_IfaceConstants;
|
||||
|
||||
virtual unsigned int readCycleStartTime(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tConfig_IfaceConstants;
|
||||
|
||||
virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_Period(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual void writeConfig_MinHigh(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual tConfig readConfig(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readConfig_Period(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readConfig_MinHigh(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tCycleStartTimeUpper_IfaceConstants;
|
||||
|
||||
virtual unsigned int readCycleStartTimeUpper(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tLoopTiming_IfaceConstants;
|
||||
|
||||
virtual unsigned short readLoopTiming(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumPeriodScaleMXPElements = 10,
|
||||
} tPeriodScaleMXP_IfaceConstants;
|
||||
|
||||
virtual void writePeriodScaleMXP(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readPeriodScaleMXP(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumPeriodScaleHdrElements = 10,
|
||||
} tPeriodScaleHdr_IfaceConstants;
|
||||
|
||||
virtual void writePeriodScaleHdr(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readPeriodScaleHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumZeroLatchElements = 20,
|
||||
} tZeroLatch_IfaceConstants;
|
||||
|
||||
virtual void writeZeroLatch(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readZeroLatch(unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumHdrRegisters = 10,
|
||||
} tHdr_IfaceConstants;
|
||||
|
||||
virtual void writeHdr(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readHdr(unsigned char reg_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumMXPRegisters = 10,
|
||||
} tMXP_IfaceConstants;
|
||||
|
||||
virtual void writeMXP(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readMXP(unsigned char reg_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
private:
|
||||
tPWM(const tPWM&);
|
||||
void operator=(const tPWM&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_PWM_h__
|
||||
@@ -1,221 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Power_h__
|
||||
#define __nFRC_2018_18_0_8_Power_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tPower
|
||||
{
|
||||
public:
|
||||
tPower(){}
|
||||
virtual ~tPower(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tPower* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned User3V3 : 8;
|
||||
unsigned User5V : 8;
|
||||
unsigned User6V : 8;
|
||||
#else
|
||||
unsigned User6V : 8;
|
||||
unsigned User5V : 8;
|
||||
unsigned User3V3 : 8;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 24;
|
||||
};
|
||||
} tStatus;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned OverCurrentFaultCount3V3 : 8;
|
||||
unsigned OverCurrentFaultCount5V : 8;
|
||||
unsigned OverCurrentFaultCount6V : 8;
|
||||
unsigned UnderVoltageFaultCount5V : 8;
|
||||
#else
|
||||
unsigned UnderVoltageFaultCount5V : 8;
|
||||
unsigned OverCurrentFaultCount6V : 8;
|
||||
unsigned OverCurrentFaultCount5V : 8;
|
||||
unsigned OverCurrentFaultCount3V3 : 8;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tFaultCounts;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned User3V3 : 1;
|
||||
unsigned User5V : 1;
|
||||
unsigned User6V : 1;
|
||||
#else
|
||||
unsigned User6V : 1;
|
||||
unsigned User5V : 1;
|
||||
unsigned User3V3 : 1;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 3;
|
||||
};
|
||||
} tDisable;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tUserVoltage3V3_IfaceConstants;
|
||||
|
||||
virtual unsigned short readUserVoltage3V3(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tStatus_IfaceConstants;
|
||||
|
||||
virtual tStatus readStatus(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readStatus_User3V3(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readStatus_User5V(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readStatus_User6V(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tUserVoltage6V_IfaceConstants;
|
||||
|
||||
virtual unsigned short readUserVoltage6V(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tOnChipTemperature_IfaceConstants;
|
||||
|
||||
virtual unsigned short readOnChipTemperature(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tUserVoltage5V_IfaceConstants;
|
||||
|
||||
virtual unsigned short readUserVoltage5V(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tResetFaultCounts_IfaceConstants;
|
||||
|
||||
virtual void strobeResetFaultCounts(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tIntegratedIO_IfaceConstants;
|
||||
|
||||
virtual unsigned short readIntegratedIO(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tMXP_DIOVoltage_IfaceConstants;
|
||||
|
||||
virtual unsigned short readMXP_DIOVoltage(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tUserCurrent3V3_IfaceConstants;
|
||||
|
||||
virtual unsigned short readUserCurrent3V3(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tVinVoltage_IfaceConstants;
|
||||
|
||||
virtual unsigned short readVinVoltage(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tUserCurrent6V_IfaceConstants;
|
||||
|
||||
virtual unsigned short readUserCurrent6V(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tUserCurrent5V_IfaceConstants;
|
||||
|
||||
virtual unsigned short readUserCurrent5V(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tAOVoltage_IfaceConstants;
|
||||
|
||||
virtual unsigned short readAOVoltage(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tFaultCounts_IfaceConstants;
|
||||
|
||||
virtual tFaultCounts readFaultCounts(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readFaultCounts_OverCurrentFaultCount3V3(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readFaultCounts_OverCurrentFaultCount5V(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readFaultCounts_OverCurrentFaultCount6V(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readFaultCounts_UnderVoltageFaultCount5V(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tVinCurrent_IfaceConstants;
|
||||
|
||||
virtual unsigned short readVinCurrent(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDisable_IfaceConstants;
|
||||
|
||||
virtual void writeDisable(tDisable value, tRioStatusCode *status) = 0;
|
||||
virtual void writeDisable_User3V3(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeDisable_User5V(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeDisable_User6V(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tDisable readDisable(tRioStatusCode *status) = 0;
|
||||
virtual bool readDisable_User3V3(tRioStatusCode *status) = 0;
|
||||
virtual bool readDisable_User5V(tRioStatusCode *status) = 0;
|
||||
virtual bool readDisable_User6V(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tPower(const tPower&);
|
||||
void operator=(const tPower&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Power_h__
|
||||
@@ -1,69 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_Relay_h__
|
||||
#define __nFRC_2018_18_0_8_Relay_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tRelay
|
||||
{
|
||||
public:
|
||||
tRelay(){}
|
||||
virtual ~tRelay(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tRelay* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Forward : 4;
|
||||
unsigned Reverse : 4;
|
||||
#else
|
||||
unsigned Reverse : 4;
|
||||
unsigned Forward : 4;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 8;
|
||||
};
|
||||
} tValue;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tValue_IfaceConstants;
|
||||
|
||||
virtual void writeValue(tValue value, tRioStatusCode *status) = 0;
|
||||
virtual void writeValue_Forward(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeValue_Reverse(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual tValue readValue(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readValue_Forward(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readValue_Reverse(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tRelay(const tRelay&);
|
||||
void operator=(const tRelay&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_Relay_h__
|
||||
@@ -1,237 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_SPI_h__
|
||||
#define __nFRC_2018_18_0_8_SPI_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tSPI
|
||||
{
|
||||
public:
|
||||
tSPI(){}
|
||||
virtual ~tSPI(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tSPI* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned ExternalClockSource_Channel : 4;
|
||||
unsigned ExternalClockSource_Module : 1;
|
||||
unsigned ExternalClockSource_AnalogTrigger : 1;
|
||||
unsigned RisingEdge : 1;
|
||||
unsigned FallingEdge : 1;
|
||||
unsigned ExternalClock : 1;
|
||||
#else
|
||||
unsigned ExternalClock : 1;
|
||||
unsigned FallingEdge : 1;
|
||||
unsigned RisingEdge : 1;
|
||||
unsigned ExternalClockSource_AnalogTrigger : 1;
|
||||
unsigned ExternalClockSource_Module : 1;
|
||||
unsigned ExternalClockSource_Channel : 4;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 9;
|
||||
};
|
||||
} tAutoTriggerConfig;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned TxByteCount : 4;
|
||||
unsigned ZeroByteCount : 7;
|
||||
#else
|
||||
unsigned ZeroByteCount : 7;
|
||||
unsigned TxByteCount : 4;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 11;
|
||||
};
|
||||
} tAutoByteCount;
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned Hdr : 4;
|
||||
unsigned MXP : 1;
|
||||
#else
|
||||
unsigned MXP : 1;
|
||||
unsigned Hdr : 4;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 5;
|
||||
};
|
||||
} tChipSelectActiveHigh;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDebugIntStatReadCount_IfaceConstants;
|
||||
|
||||
virtual unsigned int readDebugIntStatReadCount(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDebugState_IfaceConstants;
|
||||
|
||||
virtual unsigned short readDebugState(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tAutoTriggerConfig_IfaceConstants;
|
||||
|
||||
virtual void writeAutoTriggerConfig(tAutoTriggerConfig value, tRioStatusCode *status) = 0;
|
||||
virtual void writeAutoTriggerConfig_ExternalClockSource_Channel(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeAutoTriggerConfig_ExternalClockSource_Module(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeAutoTriggerConfig_ExternalClockSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeAutoTriggerConfig_RisingEdge(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeAutoTriggerConfig_FallingEdge(bool value, tRioStatusCode *status) = 0;
|
||||
virtual void writeAutoTriggerConfig_ExternalClock(bool value, tRioStatusCode *status) = 0;
|
||||
virtual tAutoTriggerConfig readAutoTriggerConfig(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readAutoTriggerConfig_ExternalClockSource_Channel(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readAutoTriggerConfig_ExternalClockSource_Module(tRioStatusCode *status) = 0;
|
||||
virtual bool readAutoTriggerConfig_ExternalClockSource_AnalogTrigger(tRioStatusCode *status) = 0;
|
||||
virtual bool readAutoTriggerConfig_RisingEdge(tRioStatusCode *status) = 0;
|
||||
virtual bool readAutoTriggerConfig_FallingEdge(tRioStatusCode *status) = 0;
|
||||
virtual bool readAutoTriggerConfig_ExternalClock(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tAutoChipSelect_IfaceConstants;
|
||||
|
||||
virtual void writeAutoChipSelect(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readAutoChipSelect(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDebugRevision_IfaceConstants;
|
||||
|
||||
virtual unsigned int readDebugRevision(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tTransferSkippedFullCount_IfaceConstants;
|
||||
|
||||
virtual unsigned int readTransferSkippedFullCount(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tAutoByteCount_IfaceConstants;
|
||||
|
||||
virtual void writeAutoByteCount(tAutoByteCount value, tRioStatusCode *status) = 0;
|
||||
virtual void writeAutoByteCount_TxByteCount(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeAutoByteCount_ZeroByteCount(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual tAutoByteCount readAutoByteCount(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readAutoByteCount_TxByteCount(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readAutoByteCount_ZeroByteCount(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDebugIntStat_IfaceConstants;
|
||||
|
||||
virtual unsigned int readDebugIntStat(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDebugEnabled_IfaceConstants;
|
||||
|
||||
virtual unsigned int readDebugEnabled(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tAutoSPI1Select_IfaceConstants;
|
||||
|
||||
virtual void writeAutoSPI1Select(bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readAutoSPI1Select(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tDebugSubstate_IfaceConstants;
|
||||
|
||||
virtual unsigned char readDebugSubstate(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tAutoRate_IfaceConstants;
|
||||
|
||||
virtual void writeAutoRate(unsigned int value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned int readAutoRate(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tEnableDIO_IfaceConstants;
|
||||
|
||||
virtual void writeEnableDIO(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readEnableDIO(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tChipSelectActiveHigh_IfaceConstants;
|
||||
|
||||
virtual void writeChipSelectActiveHigh(tChipSelectActiveHigh value, tRioStatusCode *status) = 0;
|
||||
virtual void writeChipSelectActiveHigh_Hdr(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual void writeChipSelectActiveHigh_MXP(unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual tChipSelectActiveHigh readChipSelectActiveHigh(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readChipSelectActiveHigh_Hdr(tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readChipSelectActiveHigh_MXP(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tAutoForceOne_IfaceConstants;
|
||||
|
||||
virtual void strobeAutoForceOne(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumAutoTxRegisters = 4,
|
||||
kNumAutoTxElements = 4,
|
||||
} tAutoTx_IfaceConstants;
|
||||
|
||||
virtual void writeAutoTx(unsigned char reg_index, unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned char readAutoTx(unsigned char reg_index, unsigned char bitfield_index, tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
private:
|
||||
tSPI(const tSPI&);
|
||||
void operator=(const tSPI&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_SPI_h__
|
||||
@@ -1,109 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2018_18_0_8_SysWatchdog_h__
|
||||
#define __nFRC_2018_18_0_8_SysWatchdog_h__
|
||||
|
||||
#include "../tSystem.h"
|
||||
#include "../tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2018_18_0_8
|
||||
{
|
||||
|
||||
class tSysWatchdog
|
||||
{
|
||||
public:
|
||||
tSysWatchdog(){}
|
||||
virtual ~tSysWatchdog(){}
|
||||
|
||||
virtual tSystemInterface* getSystemInterface() = 0;
|
||||
static tSysWatchdog* create(tRioStatusCode *status);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kNumSystems = 1,
|
||||
} tIfaceConstants;
|
||||
|
||||
typedef
|
||||
union{
|
||||
struct{
|
||||
#ifdef __vxworks
|
||||
unsigned SystemActive : 1;
|
||||
unsigned PowerAlive : 1;
|
||||
unsigned SysDisableCount : 15;
|
||||
unsigned PowerDisableCount : 15;
|
||||
#else
|
||||
unsigned PowerDisableCount : 15;
|
||||
unsigned SysDisableCount : 15;
|
||||
unsigned PowerAlive : 1;
|
||||
unsigned SystemActive : 1;
|
||||
#endif
|
||||
};
|
||||
struct{
|
||||
unsigned value : 32;
|
||||
};
|
||||
} tStatus;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tStatus_IfaceConstants;
|
||||
|
||||
virtual tStatus readStatus(tRioStatusCode *status) = 0;
|
||||
virtual bool readStatus_SystemActive(tRioStatusCode *status) = 0;
|
||||
virtual bool readStatus_PowerAlive(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readStatus_SysDisableCount(tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readStatus_PowerDisableCount(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tCommand_IfaceConstants;
|
||||
|
||||
virtual void writeCommand(unsigned short value, tRioStatusCode *status) = 0;
|
||||
virtual unsigned short readCommand(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tChallenge_IfaceConstants;
|
||||
|
||||
virtual unsigned char readChallenge(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tActive_IfaceConstants;
|
||||
|
||||
virtual void writeActive(bool value, tRioStatusCode *status) = 0;
|
||||
virtual bool readActive(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tTimer_IfaceConstants;
|
||||
|
||||
virtual unsigned int readTimer(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
} tForcedKills_IfaceConstants;
|
||||
|
||||
virtual unsigned short readForcedKills(tRioStatusCode *status) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
tSysWatchdog(const tSysWatchdog&);
|
||||
void operator=(const tSysWatchdog&);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2018_18_0_8_SysWatchdog_h__
|
||||
@@ -1,42 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
|
||||
#ifndef __printFPGAVersion_h__
|
||||
#define __printFPGAVersion_h__
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
|
||||
template<typename ttGlobal>
|
||||
inline void printFPGAVersion(ttGlobal &global)
|
||||
{
|
||||
tRioStatusCode cleanStatus=0;
|
||||
uint32_t hardwareGuid[4];
|
||||
tSystemInterface &system = *global.getSystemInterface();
|
||||
system.getHardwareFpgaSignature(hardwareGuid, &cleanStatus);
|
||||
const uint32_t *softwareGuid = system.getExpectedFPGASignature();
|
||||
printf("FPGA Hardware GUID: 0x");
|
||||
for(int i=0; i<4; i++)
|
||||
{
|
||||
printf("%08X", hardwareGuid[i]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("FPGA Software GUID: 0x");
|
||||
for(int i=0; i<4; i++)
|
||||
{
|
||||
printf("%08X", softwareGuid[i]);
|
||||
}
|
||||
printf("\n");
|
||||
uint16_t fpgaHardwareVersion = global.readVersion(&cleanStatus);
|
||||
uint16_t fpgaSoftwareVersion = system.getExpectedFPGAVersion();
|
||||
printf("FPGA Hardware Version: %X\n", fpgaHardwareVersion);
|
||||
printf("FPGA Software Version: %X\n", fpgaSoftwareVersion);
|
||||
uint32_t fpgaHardwareRevision = global.readRevision(&cleanStatus);
|
||||
uint32_t fpgaSoftwareRevision = system.getExpectedFPGARevision();
|
||||
printf("FPGA Hardware Revision: %X.%X.%X\n", (fpgaHardwareRevision >> 20) & 0xFFF, (fpgaHardwareRevision >> 12) & 0xFF, fpgaHardwareRevision & 0xFFF);
|
||||
printf("FPGA Software Revision: %X.%X.%X\n", (fpgaSoftwareRevision >> 20) & 0xFFF, (fpgaSoftwareRevision >> 12) & 0xFF, fpgaSoftwareRevision & 0xFFF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // __printFPGAVersion_h__
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// Describes the information needed to configure a DMA channel.
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __tDMAChannelDescriptor_h__
|
||||
#define __tDMAChannelDescriptor_h__
|
||||
|
||||
struct tDMAChannelDescriptor
|
||||
{
|
||||
uint32_t channel;
|
||||
uint32_t baseAddress;
|
||||
uint32_t depth;
|
||||
bool targetToHost;
|
||||
};
|
||||
|
||||
#endif // __tDMAChannelDescriptor_h__
|
||||
@@ -1,53 +0,0 @@
|
||||
// Class for handling DMA transfers.
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
|
||||
#ifndef __tDMAManager_h__
|
||||
#define __tDMAManager_h__
|
||||
|
||||
#include "tSystem.h"
|
||||
#include <stdint.h>
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
class tDMAManager : public tSystem
|
||||
{
|
||||
public:
|
||||
tDMAManager(uint32_t dmaChannel, uint32_t hostBufferSize, tRioStatusCode *status);
|
||||
~tDMAManager();
|
||||
void start(tRioStatusCode *status);
|
||||
void stop(tRioStatusCode *status);
|
||||
bool isStarted() {return _started;}
|
||||
void read(
|
||||
uint32_t* buf,
|
||||
size_t num,
|
||||
uint32_t timeout,
|
||||
size_t* remaining,
|
||||
tRioStatusCode *status);
|
||||
void write(
|
||||
uint32_t* buf,
|
||||
size_t num,
|
||||
uint32_t timeout,
|
||||
size_t* remaining,
|
||||
tRioStatusCode *status);
|
||||
void read(
|
||||
uint8_t* buf,
|
||||
size_t num,
|
||||
uint32_t timeout,
|
||||
size_t* remaining,
|
||||
tRioStatusCode *status);
|
||||
void write(
|
||||
uint8_t* buf,
|
||||
size_t num,
|
||||
uint32_t timeout,
|
||||
size_t* remaining,
|
||||
tRioStatusCode *status);
|
||||
private:
|
||||
bool _started;
|
||||
uint32_t _dmaChannel;
|
||||
uint32_t _hostBufferSize;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __tDMAManager_h__
|
||||
@@ -1,61 +0,0 @@
|
||||
// Class for handling interrupts.
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
|
||||
#ifndef __tInterruptManager_h__
|
||||
#define __tInterruptManager_h__
|
||||
|
||||
#include "tSystem.h"
|
||||
|
||||
namespace ni
|
||||
{
|
||||
namespace dsc
|
||||
{
|
||||
namespace osdep
|
||||
{
|
||||
class CriticalSection;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
|
||||
typedef void (*tInterruptHandler)(uint32_t interruptAssertedMask, void *param);
|
||||
|
||||
class tInterruptManager : public tSystem
|
||||
{
|
||||
public:
|
||||
tInterruptManager(uint32_t interruptMask, bool watcher, tRioStatusCode *status);
|
||||
~tInterruptManager();
|
||||
void registerHandler(tInterruptHandler handler, void *param, tRioStatusCode *status);
|
||||
uint32_t watch(int32_t timeoutInMs, bool ignorePrevious, tRioStatusCode *status);
|
||||
void enable(tRioStatusCode *status);
|
||||
void disable(tRioStatusCode *status);
|
||||
bool isEnabled(tRioStatusCode *status);
|
||||
private:
|
||||
class tInterruptThread;
|
||||
friend class tInterruptThread;
|
||||
void handler();
|
||||
static int handlerWrapper(tInterruptManager *pInterrupt);
|
||||
|
||||
void acknowledge(tRioStatusCode *status);
|
||||
void reserve(tRioStatusCode *status);
|
||||
void unreserve(tRioStatusCode *status);
|
||||
tInterruptHandler _handler;
|
||||
uint32_t _interruptMask;
|
||||
tInterruptThread *_thread;
|
||||
NiFpga_IrqContext _rioContext;
|
||||
bool _watcher;
|
||||
bool _enabled;
|
||||
void *_userParam;
|
||||
|
||||
// maintain the interrupts that are already dealt with.
|
||||
static uint32_t _globalInterruptMask;
|
||||
static ni::dsc::osdep::CriticalSection *_globalInterruptMaskSemaphore;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif // __tInterruptManager_h__
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
// Base class for generated chip objects
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
|
||||
#ifndef __tSystem_h__
|
||||
#define __tSystem_h__
|
||||
|
||||
#include "fpgainterfacecapi/NiFpga.h"
|
||||
typedef NiFpga_Status tRioStatusCode;
|
||||
|
||||
#define FRC_FPGA_PRELOAD_BITFILE
|
||||
|
||||
typedef uint32_t NiFpga_Session;
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
|
||||
class tSystem
|
||||
{
|
||||
public:
|
||||
tSystem(tRioStatusCode *status);
|
||||
~tSystem();
|
||||
void getFpgaGuid(uint32_t *guid_ptr, tRioStatusCode *status);
|
||||
void reset(tRioStatusCode *status);
|
||||
|
||||
protected:
|
||||
static NiFpga_Session _DeviceHandle;
|
||||
|
||||
#ifdef FRC_FPGA_PRELOAD_BITFILE
|
||||
void NiFpga_SharedOpen_common(const char* bitfile);
|
||||
NiFpga_Status NiFpga_SharedOpen(const char* bitfile,
|
||||
const char* signature,
|
||||
const char* resource,
|
||||
uint32_t attribute,
|
||||
NiFpga_Session* session);
|
||||
NiFpga_Status NiFpgaLv_SharedOpen(const char* const bitfile,
|
||||
const char* const apiSignature,
|
||||
const char* const resource,
|
||||
const uint32_t attribute,
|
||||
NiFpga_Session* const session);
|
||||
private:
|
||||
static char *_FileName;
|
||||
static char *_Bitfile;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __tSystem_h__
|
||||
@@ -1,30 +0,0 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
|
||||
#ifndef __tSystemInterface_h__
|
||||
#define __tSystemInterface_h__
|
||||
|
||||
#include "tDMAChannelDescriptor.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
|
||||
class tSystemInterface
|
||||
{
|
||||
public:
|
||||
tSystemInterface(){}
|
||||
virtual ~tSystemInterface(){}
|
||||
|
||||
virtual const uint16_t getExpectedFPGAVersion()=0;
|
||||
virtual const uint32_t getExpectedFPGARevision()=0;
|
||||
virtual const uint32_t * const getExpectedFPGASignature()=0;
|
||||
virtual void getHardwareFpgaSignature(uint32_t *guid_ptr, tRioStatusCode *status)=0;
|
||||
virtual uint32_t getLVHandle(tRioStatusCode *status)=0;
|
||||
virtual uint32_t getHandle()=0;
|
||||
virtual void reset(tRioStatusCode *status)=0;
|
||||
virtual void getDmaDescriptor(int dmaChannelDescriptorIndex, tDMAChannelDescriptor *desc)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __tSystemInterface_h__
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
#ifndef __AICalibration_h__
|
||||
#define __AICalibration_h__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
uint32_t FRC_NetworkCommunication_nAICalibration_getLSBWeight(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status);
|
||||
int32_t FRC_NetworkCommunication_nAICalibration_getOffset(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __AICalibration_h__
|
||||
@@ -1,82 +0,0 @@
|
||||
// CANInterfacePlugin.h
|
||||
//
|
||||
// Defines the API for building a CAN Interface Plugin to support
|
||||
// PWM-cable-free CAN motor control on FRC robots. This allows you
|
||||
// to connect any CAN interface to the secure Jaguar CAN driver.
|
||||
//
|
||||
|
||||
#ifndef __CANInterfacePlugin_h__
|
||||
#define __CANInterfacePlugin_h__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define CAN_IS_FRAME_REMOTE 0x80000000
|
||||
#define CAN_IS_FRAME_11BIT 0x40000000
|
||||
#define CAN_29BIT_MESSAGE_ID_MASK 0x1FFFFFFF
|
||||
#define CAN_11BIT_MESSAGE_ID_MASK 0x000007FF
|
||||
|
||||
class CANInterfacePlugin
|
||||
{
|
||||
public:
|
||||
CANInterfacePlugin() {}
|
||||
virtual ~CANInterfacePlugin() {}
|
||||
|
||||
/**
|
||||
* This entry-point of the CANInterfacePlugin is passed a message that the driver needs to send to
|
||||
* a device on the CAN bus.
|
||||
*
|
||||
* This function may be called from multiple contexts and must therefore be reentrant.
|
||||
*
|
||||
* @param messageID The 29-bit CAN message ID in the lsbs. The msb can indicate a remote frame.
|
||||
* @param data A pointer to a buffer containing between 0 and 8 bytes to send with the message. May be NULL if dataSize is 0.
|
||||
* @param dataSize The number of bytes to send with the message.
|
||||
* @return Return any error code. On success return 0.
|
||||
*/
|
||||
virtual int32_t sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize) = 0;
|
||||
|
||||
/**
|
||||
* This entry-point of the CANInterfacePlugin is passed buffers which should be populated with
|
||||
* any received messages from devices on the CAN bus.
|
||||
*
|
||||
* This function is always called by a single task in the Jaguar driver, so it need not be reentrant.
|
||||
*
|
||||
* This function is expected to block for some period of time waiting for a message from the CAN bus.
|
||||
* It may timeout periodically (returning non-zero to indicate no message was populated) to allow for
|
||||
* shutdown and unloading of the plugin.
|
||||
*
|
||||
* @param messageID A reference to be populated with a received 29-bit CAN message ID in the lsbs.
|
||||
* @param data A pointer to a buffer of 8 bytes to be populated with data received with the message.
|
||||
* @param dataSize A reference to be populated with the size of the data received (0 - 8 bytes).
|
||||
* @return This should return 0 if a message was populated, non-0 if no message was not populated.
|
||||
*/
|
||||
virtual int32_t receiveMessage(uint32_t &messageID, uint8_t *data, uint8_t &dataSize) = 0;
|
||||
|
||||
#if defined(__linux)
|
||||
/**
|
||||
* This entry-point of the CANInterfacePlugin returns status of the CAN bus.
|
||||
*
|
||||
* This function may be called from multiple contexts and must therefore be reentrant.
|
||||
*
|
||||
* This function will return detailed hardware status if available for diagnostics of the CAN interface.
|
||||
*
|
||||
* @param busOffCount The number of times that sendMessage failed with a busOff error indicating that messages
|
||||
* are not successfully transmitted on the bus.
|
||||
* @param txFullCount The number of times that sendMessage failed with a txFifoFull error indicating that messages
|
||||
* are not successfully received by any CAN device.
|
||||
* @param receiveErrorCount The count of receive errors as reported by the CAN driver.
|
||||
* @param transmitErrorCount The count of transmit errors as reported by the CAN driver.
|
||||
* @return This should return 0 if all status was retrieved successfully or an error code if not.
|
||||
*/
|
||||
virtual int32_t getStatus(uint32_t &busOffCount, uint32_t &txFullCount, uint32_t &receiveErrorCount, uint32_t &transmitErrorCount) {return 0;}
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* This function allows you to register a CANInterfacePlugin to provide access a CAN bus.
|
||||
*
|
||||
* @param interface A pointer to an object that inherits from CANInterfacePlugin and implements
|
||||
* the pure virtual interface. If NULL, unregister the current plugin.
|
||||
*/
|
||||
void FRC_NetworkCommunication_CANSessionMux_registerInterface(CANInterfacePlugin* interface);
|
||||
|
||||
#endif // __CANInterfacePlugin_h__
|
||||
@@ -1,66 +0,0 @@
|
||||
// CANSessionMux.h
|
||||
//
|
||||
// Defines the API for building a CAN Interface Plugin to support
|
||||
// PWM-cable-free CAN motor control on FRC robots. This allows you
|
||||
// to connect any CAN interface to the secure Jaguar CAN driver.
|
||||
//
|
||||
|
||||
#ifndef __CANSessionMux_h__
|
||||
#define __CANSessionMux_h__
|
||||
|
||||
#if defined(__vxworks)
|
||||
#include <vxWorks.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#define CAN_SEND_PERIOD_NO_REPEAT 0
|
||||
#define CAN_SEND_PERIOD_STOP_REPEATING -1
|
||||
|
||||
/* Flags in the upper bits of the messageID */
|
||||
#define CAN_IS_FRAME_REMOTE 0x80000000
|
||||
#define CAN_IS_FRAME_11BIT 0x40000000
|
||||
|
||||
#define ERR_CANSessionMux_InvalidBuffer -44086
|
||||
#define ERR_CANSessionMux_MessageNotFound -44087
|
||||
#define WARN_CANSessionMux_NoToken 44087
|
||||
#define ERR_CANSessionMux_NotAllowed -44088
|
||||
#define ERR_CANSessionMux_NotInitialized -44089
|
||||
#define ERR_CANSessionMux_SessionOverrun 44050
|
||||
|
||||
struct tCANStreamMessage{
|
||||
uint32_t messageID;
|
||||
uint32_t timeStamp;
|
||||
uint8_t data[8];
|
||||
uint8_t dataSize;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace nCANSessionMux
|
||||
{
|
||||
void sendMessage_wrapper(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t periodMs, int32_t *status);
|
||||
void receiveMessage_wrapper(uint32_t *messageID, uint32_t messageIDMask, uint8_t *data, uint8_t *dataSize, uint32_t *timeStamp, int32_t *status);
|
||||
void openStreamSession(uint32_t *sessionHandle, uint32_t messageID, uint32_t messageIDMask, uint32_t maxMessages, int32_t *status);
|
||||
void closeStreamSession(uint32_t sessionHandle);
|
||||
void readStreamSession(uint32_t sessionHandle, struct tCANStreamMessage *messages, uint32_t messagesToRead, uint32_t *messagesRead, int32_t *status);
|
||||
void getCANStatus(float *percentBusUtilization, uint32_t *busOffCount, uint32_t *txFullCount, uint32_t *receiveErrorCount, uint32_t *transmitErrorCount, int32_t *status);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void FRC_NetworkCommunication_CANSessionMux_sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t periodMs, int32_t *status);
|
||||
void FRC_NetworkCommunication_CANSessionMux_receiveMessage(uint32_t *messageID, uint32_t messageIDMask, uint8_t *data, uint8_t *dataSize, uint32_t *timeStamp, int32_t *status);
|
||||
void FRC_NetworkCommunication_CANSessionMux_openStreamSession(uint32_t *sessionHandle, uint32_t messageID, uint32_t messageIDMask, uint32_t maxMessages, int32_t *status);
|
||||
void FRC_NetworkCommunication_CANSessionMux_closeStreamSession(uint32_t sessionHandle);
|
||||
void FRC_NetworkCommunication_CANSessionMux_readStreamSession(uint32_t sessionHandle, struct tCANStreamMessage *messages, uint32_t messagesToRead, uint32_t *messagesRead, int32_t *status);
|
||||
void FRC_NetworkCommunication_CANSessionMux_getCANStatus(float *percentBusUtilization, uint32_t *busOffCount, uint32_t *txFullCount, uint32_t *receiveErrorCount, uint32_t *transmitErrorCount, int32_t *status);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __CANSessionMux_h__
|
||||
@@ -1,165 +0,0 @@
|
||||
/*************************************************************
|
||||
* NOTICE
|
||||
*
|
||||
* These are the only externally exposed functions to the
|
||||
* NetworkCommunication library
|
||||
*
|
||||
* This is an implementation of FRC Spec for Comm Protocol
|
||||
* Revision 4.5, June 30, 2008
|
||||
*
|
||||
* Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
#ifndef __FRC_COMM_H__
|
||||
#define __FRC_COMM_H__
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifdef USE_THRIFT
|
||||
# define EXPORT_FUNC
|
||||
# else
|
||||
# define EXPORT_FUNC __declspec(dllexport) __cdecl
|
||||
# endif
|
||||
#elif defined(__vxworks)
|
||||
# include <vxWorks.h>
|
||||
# define EXPORT_FUNC
|
||||
#elif defined(__linux)
|
||||
# include <stdint.h>
|
||||
# include <pthread.h>
|
||||
# define EXPORT_FUNC
|
||||
#endif
|
||||
|
||||
#define ERR_FRCSystem_NetCommNotResponding -44049
|
||||
#define ERR_FRCSystem_NoDSConnection -44018
|
||||
|
||||
#ifdef _WIN32
|
||||
# define __DEPRECATED__ __declspec(deprecated)
|
||||
#else
|
||||
# define __DEPRECATED__ __attribute__((__deprecated__))
|
||||
#endif
|
||||
|
||||
enum AllianceStationID_t {
|
||||
kAllianceStationID_red1,
|
||||
kAllianceStationID_red2,
|
||||
kAllianceStationID_red3,
|
||||
kAllianceStationID_blue1,
|
||||
kAllianceStationID_blue2,
|
||||
kAllianceStationID_blue3,
|
||||
};
|
||||
|
||||
enum MatchType_t {
|
||||
kMatchType_none,
|
||||
kMatchType_practice,
|
||||
kMatchType_qualification,
|
||||
kMatchType_elimination,
|
||||
};
|
||||
|
||||
struct ControlWord_t {
|
||||
#ifndef __vxworks
|
||||
uint32_t enabled : 1;
|
||||
uint32_t autonomous : 1;
|
||||
uint32_t test :1;
|
||||
uint32_t eStop : 1;
|
||||
uint32_t fmsAttached:1;
|
||||
uint32_t dsAttached:1;
|
||||
uint32_t control_reserved : 26;
|
||||
#else
|
||||
uint32_t control_reserved : 26;
|
||||
uint32_t dsAttached:1;
|
||||
uint32_t fmsAttached:1;
|
||||
uint32_t eStop : 1;
|
||||
uint32_t test :1;
|
||||
uint32_t autonomous : 1;
|
||||
uint32_t enabled : 1;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct JoystickAxes_t {
|
||||
uint16_t count;
|
||||
int16_t axes[1];
|
||||
};
|
||||
|
||||
struct JoystickPOV_t {
|
||||
uint16_t count;
|
||||
int16_t povs[1];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_Reserve(void *instance);
|
||||
#ifndef SIMULATION
|
||||
void EXPORT_FUNC getFPGAHardwareVersion(uint16_t *fpgaVersion, uint32_t *fpgaRevision);
|
||||
#endif
|
||||
/**
|
||||
* Safely copy data into the status packet to be sent back to the driver station.
|
||||
* @deprecated battery is the only parameter to this function that is still used, and only on cRIO / simulation.
|
||||
*/
|
||||
__DEPRECATED__ int EXPORT_FUNC setStatusData(float battery, uint8_t dsDigitalOut, uint8_t updateNumber,
|
||||
const char *userDataHigh, int userDataHighLength,
|
||||
const char *userDataLow, int userDataLowLength, int wait_ms);
|
||||
/**
|
||||
* Send error data to the DS
|
||||
* @deprecated This old method is hard to parse on the DS side. It will be removed soon. Use FRC_NetworkCommunication_sendError instead.
|
||||
* @param errorData is a cstr of the error message
|
||||
* @param errorDataLength is the length of the errorData
|
||||
* @param wait_ms is ignored (included for binary compatibility)
|
||||
* @return 0 on success, 1 on no DS connection
|
||||
*/
|
||||
__DEPRECATED__ int EXPORT_FUNC setErrorData(const char *errors, int errorsLength, int wait_ms);
|
||||
|
||||
/**
|
||||
* Send a console output line to the Driver Station
|
||||
* @param line a null-terminated string
|
||||
* @return 0 on success, other on failure
|
||||
*/
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_sendConsoleLine(const char *line);
|
||||
|
||||
/**
|
||||
* Send an error to the Driver Station
|
||||
* @param isError true if error, false if warning
|
||||
* @param errorCode value of error condition
|
||||
* @param isLVCode true if error code is defined in errors.txt, false if not (i.e. made up for C++)
|
||||
* @param details error description that contains details such as which resource number caused the failure
|
||||
* @param location Source file, function, and line number that the error was generated - optional
|
||||
* @param callStack The details about what functions were called through before the error was reported - optional
|
||||
* @return 0 on success, other on failure
|
||||
*/
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_sendError(int isError, int32_t errorCode, int isLVCode,
|
||||
const char *details, const char *location, const char *callStack);
|
||||
|
||||
#ifdef _WIN32
|
||||
void EXPORT_FUNC setNewDataSem(HANDLE);
|
||||
#elif defined (__vxworks)
|
||||
void EXPORT_FUNC setNewDataSem(SEM_ID);
|
||||
#else
|
||||
void EXPORT_FUNC setNewDataSem(pthread_cond_t *);
|
||||
#endif
|
||||
|
||||
// this uint32_t is really a LVRefNum
|
||||
int EXPORT_FUNC setNewDataOccurRef(uint32_t refnum);
|
||||
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_getControlWord(struct ControlWord_t *controlWord);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_getAllianceStation(enum AllianceStationID_t *allianceStation);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_getMatchInfo(char *eventName, enum MatchType_t *matchType, uint16_t *matchNumber, uint8_t *replayNumber,
|
||||
uint8_t *gameSpecificMessage, uint16_t *gameSpecificMessageSize);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_getMatchTime(float *matchTime);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_getJoystickAxes(uint8_t joystickNum, struct JoystickAxes_t *axes, uint8_t maxAxes);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_getJoystickButtons(uint8_t joystickNum, uint32_t *buttons, uint8_t *count);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_getJoystickPOVs(uint8_t joystickNum, struct JoystickPOV_t *povs, uint8_t maxPOVs);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_setJoystickOutputs(uint8_t joystickNum, uint32_t hidOutputs, uint16_t leftRumble, uint16_t rightRumble);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_getJoystickDesc(uint8_t joystickNum, uint8_t *isXBox, uint8_t *type, char *name,
|
||||
uint8_t *axisCount, uint8_t *axisTypes, uint8_t *buttonCount, uint8_t *povCount);
|
||||
|
||||
void EXPORT_FUNC FRC_NetworkCommunication_getVersionString(char *version);
|
||||
int EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramStarting(void);
|
||||
void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramDisabled(void);
|
||||
void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramAutonomous(void);
|
||||
void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTeleop(void);
|
||||
void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTest(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,58 +0,0 @@
|
||||
|
||||
#ifndef __LoadOut_h__
|
||||
#define __LoadOut_h__
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#define EXPORT_FUNC __declspec(dllexport) __cdecl
|
||||
#elif defined (__vxworks)
|
||||
#include <vxWorks.h>
|
||||
#define EXPORT_FUNC
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#define EXPORT_FUNC
|
||||
#endif
|
||||
|
||||
#define kMaxModuleNumber 2
|
||||
namespace nLoadOut
|
||||
{
|
||||
#if defined(__vxworks) || defined(SIMULATION)
|
||||
typedef enum {
|
||||
kModuleType_Unknown = 0x00,
|
||||
kModuleType_Analog = 0x01,
|
||||
kModuleType_Digital = 0x02,
|
||||
kModuleType_Solenoid = 0x03,
|
||||
} tModuleType;
|
||||
bool EXPORT_FUNC getModulePresence(tModuleType moduleType, uint8_t moduleNumber);
|
||||
#endif
|
||||
typedef enum {
|
||||
kTargetClass_Unknown = 0x00,
|
||||
kTargetClass_FRC1 = 0x10,
|
||||
kTargetClass_FRC2 = 0x20,
|
||||
kTargetClass_FRC3 = 0x30,
|
||||
kTargetClass_RoboRIO = 0x40,
|
||||
#if defined(__vxworks) || defined(SIMULATION)
|
||||
kTargetClass_FRC2_Analog = kTargetClass_FRC2 | kModuleType_Analog,
|
||||
kTargetClass_FRC2_Digital = kTargetClass_FRC2 | kModuleType_Digital,
|
||||
kTargetClass_FRC2_Solenoid = kTargetClass_FRC2 | kModuleType_Solenoid,
|
||||
#endif
|
||||
kTargetClass_FamilyMask = 0xF0,
|
||||
kTargetClass_ModuleMask = 0x0F,
|
||||
} tTargetClass;
|
||||
tTargetClass EXPORT_FUNC getTargetClass();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__vxworks) || defined(SIMULATION)
|
||||
uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getModulePresence(uint32_t moduleType, uint8_t moduleNumber);
|
||||
#endif
|
||||
uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getTargetClass();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __LoadOut_h__
|
||||
@@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void NetCommRPCProxy_SetOccurFuncPointer(void (*Occur)(uint32_t));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,24 +0,0 @@
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
def pubVersion
|
||||
if (project.hasProperty("publishVersion")) {
|
||||
pubVersion = project.publishVersion
|
||||
} else {
|
||||
pubVersion = WPILibVersion.version
|
||||
}
|
||||
|
||||
def baseArtifactId = 'ni-libraries'
|
||||
def artifactGroupId = 'edu.wpi.first.ni-libraries'
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
nilibraries(MavenPublication) {
|
||||
artifact libZip
|
||||
artifact headersZip
|
||||
|
||||
artifactId = "${baseArtifactId}"
|
||||
groupId artifactGroupId
|
||||
version pubVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ pluginManagement {
|
||||
}
|
||||
enableFeaturePreview('STABLE_PUBLISHING')
|
||||
|
||||
include 'ni-libraries'
|
||||
include 'wpiutil'
|
||||
include 'ntcore'
|
||||
include 'hal'
|
||||
|
||||
@@ -30,6 +30,18 @@ staticGtestConfigs["${nativeName}Test"] = []
|
||||
|
||||
apply from: "${rootDir}/shared/googletest.gradle"
|
||||
|
||||
if (project.hasProperty('niLibraries')) {
|
||||
ext {
|
||||
chipObjectComponents = ["$nativeName".toString(), "${nativeName}Dev".toString(), "${nativeName}Base".toString(),
|
||||
"${nativeName}JNI".toString(), "${nativeName}Test".toString()]
|
||||
netCommComponents = ["$nativeName".toString(), "${nativeName}Dev".toString(), "${nativeName}Base".toString(),
|
||||
"${nativeName}JNI".toString(), "${nativeName}Test".toString()]
|
||||
useNiJava = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
}
|
||||
|
||||
model {
|
||||
components {
|
||||
"${nativeName}Base"(JniNativeLibrarySpec) {
|
||||
@@ -45,7 +57,10 @@ model {
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/main/native/include'
|
||||
srcDir 'src/main/native/include'
|
||||
if (project.hasProperty('generatedHeaders')) {
|
||||
srcDir generatedHeaders
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,9 +73,6 @@ model {
|
||||
if (project.hasProperty('splitSetup')) {
|
||||
splitSetup(it)
|
||||
}
|
||||
if (project.hasProperty('niLibraries')) {
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
"${nativeName}"(JniNativeLibrarySpec) {
|
||||
@@ -77,15 +89,15 @@ model {
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/main/native/include'
|
||||
srcDir 'src/main/native/include'
|
||||
if (project.hasProperty('generatedHeaders')) {
|
||||
srcDir generatedHeaders
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binaries.all {
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
if (project.hasProperty('niLibraries')) {
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
"${nativeName}JNI"(JniNativeLibrarySpec) {
|
||||
@@ -104,7 +116,10 @@ model {
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/main/native/include'
|
||||
srcDir 'src/main/native/include'
|
||||
if (project.hasProperty('generatedHeaders')) {
|
||||
srcDir generatedHeaders
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,14 +142,14 @@ model {
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/dev/native/include'
|
||||
srcDir 'src/main/native/include'
|
||||
if (project.hasProperty('generatedHeaders')) {
|
||||
srcDir generatedHeaders
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binaries.all {
|
||||
if (project.hasProperty('niLibraries')) {
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
}
|
||||
lib library: nativeName, linkage: 'shared'
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
}
|
||||
@@ -156,6 +171,9 @@ model {
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/test/native/include', 'src/main/native/cpp'
|
||||
if (project.hasProperty('generatedHeaders')) {
|
||||
srcDir generatedHeaders
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
shared/nilibraries.gradle
Normal file
33
shared/nilibraries.gradle
Normal file
@@ -0,0 +1,33 @@
|
||||
def netCommLibConfigs = [:];
|
||||
def chipObjectConfigs = [:];
|
||||
|
||||
project.chipObjectComponents.each { String s->
|
||||
chipObjectConfigs[s] = ['linux:athena']
|
||||
}
|
||||
|
||||
project.netCommComponents.each { String s->
|
||||
netCommLibConfigs[s] = ['linux:athena']
|
||||
}
|
||||
|
||||
model {
|
||||
dependencyConfigs {
|
||||
chipobject(DependencyConfig) {
|
||||
groupId = 'edu.wpi.first.ni-libraries'
|
||||
artifactId = 'chipobject'
|
||||
headerClassifier = 'headers'
|
||||
ext = 'zip'
|
||||
version = '2018.17.0'
|
||||
sharedConfigs = chipObjectConfigs
|
||||
staticConfigs = [:]
|
||||
}
|
||||
netcomm(DependencyConfig) {
|
||||
groupId = 'edu.wpi.first.ni-libraries'
|
||||
artifactId = 'netcomm-cpp'
|
||||
headerClassifier = 'headers'
|
||||
ext = 'zip'
|
||||
version = '2018.17.0'
|
||||
sharedConfigs = netCommLibConfigs
|
||||
staticConfigs = [:]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,14 @@ apply plugin: 'cpp'
|
||||
apply plugin: 'edu.wpi.first.NativeUtils'
|
||||
apply plugin: ExtraTasks
|
||||
|
||||
ext {
|
||||
chipObjectComponents = ["$pluginName".toString(), "${pluginName}Dev".toString(), "${pluginName}Test".toString()]
|
||||
netCommComponents = ["$pluginName".toString(), "${pluginName}Dev".toString(), "${pluginName}Test".toString()]
|
||||
useNiJava = false
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
|
||||
if (!project.hasProperty('onlyAthena')) {
|
||||
ext.skipAthena = true
|
||||
apply from: "${rootDir}/shared/config.gradle"
|
||||
@@ -25,7 +33,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
it.buildable = false
|
||||
return
|
||||
}
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
if (project.hasProperty('includeNtCore')) {
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
}
|
||||
@@ -47,7 +55,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
}
|
||||
}
|
||||
binaries.all {
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib library: pluginName
|
||||
if (project.hasProperty('includeNtCore')) {
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
|
||||
@@ -29,6 +29,13 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
|
||||
project(':').libraryBuild.dependsOn build
|
||||
|
||||
ext {
|
||||
chipObjectComponents = ["$nativeName".toString(), "${nativeName}Base".toString(), "${nativeName}Dev".toString(), "${nativeName}Test".toString()]
|
||||
netCommComponents = ["$nativeName".toString(), "${nativeName}Base".toString(), "${nativeName}Dev".toString(), "${nativeName}Test".toString()]
|
||||
useNiJava = false
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
|
||||
model {
|
||||
exportsConfigs {
|
||||
@@ -65,7 +72,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
it.buildable = false
|
||||
return
|
||||
}
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
}
|
||||
}
|
||||
@@ -86,7 +93,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
it.buildable = false
|
||||
return
|
||||
}
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
}
|
||||
}
|
||||
@@ -110,7 +117,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
it.buildable = false
|
||||
return
|
||||
}
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib library: nativeName, linkage: 'shared'
|
||||
}
|
||||
@@ -120,11 +127,10 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
withType(GoogleTestTestSuiteBinarySpec) {
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
lib library: nativeName, linkage: 'shared'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ model {
|
||||
}
|
||||
binaries {
|
||||
withType(GoogleTestTestSuiteBinarySpec) {
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib library: pluginName, linkage: 'shared'
|
||||
}
|
||||
|
||||
@@ -30,6 +30,15 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
|
||||
project(':').libraryBuild.dependsOn build
|
||||
|
||||
ext {
|
||||
chipObjectComponents = ["$nativeName".toString(), "${nativeName}Dev".toString(), "${nativeName}Base".toString(),
|
||||
"${nativeName}Test".toString()]
|
||||
netCommComponents = ["$nativeName".toString(), "${nativeName}Dev".toString(), "${nativeName}Base".toString(),
|
||||
"${nativeName}Test".toString()]
|
||||
useNiJava = false
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
|
||||
model {
|
||||
exportsConfigs {
|
||||
@@ -66,7 +75,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
it.buildable = false
|
||||
return
|
||||
}
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_adx_gyro_accelerometer', library: 'halsim_adx_gyro_accelerometer', linkage: 'shared'
|
||||
}
|
||||
@@ -88,7 +97,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
it.buildable = false
|
||||
return
|
||||
}
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_adx_gyro_accelerometer', library: 'halsim_adx_gyro_accelerometer', linkage: 'shared'
|
||||
}
|
||||
@@ -113,7 +122,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
it.buildable = false
|
||||
return
|
||||
}
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_adx_gyro_accelerometer', library: 'halsim_adx_gyro_accelerometer', linkage: 'shared'
|
||||
lib library: nativeName, linkage: 'shared'
|
||||
@@ -124,7 +133,7 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
withType(GoogleTestTestSuiteBinarySpec) {
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
|
||||
@@ -71,6 +71,16 @@ staticGtestConfigs["${nativeName}Test"] = []
|
||||
|
||||
apply from: "${rootDir}/shared/googletest.gradle"
|
||||
|
||||
ext {
|
||||
chipObjectComponents = ["$nativeName".toString(), "${nativeName}Dev".toString(), "${nativeName}Base".toString(),
|
||||
"${nativeName}Test".toString()]
|
||||
netCommComponents = ["$nativeName".toString(), "${nativeName}Dev".toString(), "${nativeName}Base".toString(),
|
||||
"${nativeName}Test".toString()]
|
||||
useNiJava = false
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
|
||||
model {
|
||||
exportsConfigs {
|
||||
wpilibc(ExportsConfig) {
|
||||
@@ -104,10 +114,9 @@ model {
|
||||
}
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
}
|
||||
}
|
||||
"${nativeName}"(NativeLibrarySpec) {
|
||||
@@ -125,10 +134,9 @@ model {
|
||||
binaries.all {
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
}
|
||||
}
|
||||
// By default, a development executable will be generated. This is to help the case of
|
||||
@@ -149,10 +157,9 @@ model {
|
||||
binaries.all {
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,10 +203,9 @@ model {
|
||||
if (!project.hasProperty('onlyAthena')) {
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
lib library: nativeName, linkage: 'shared'
|
||||
} else {
|
||||
it.buildable = false
|
||||
|
||||
@@ -39,6 +39,21 @@ ext {
|
||||
|
||||
apply from: "${rootDir}/shared/opencv.gradle"
|
||||
|
||||
ext {
|
||||
chipObjectComponents = ['commands']
|
||||
netCommComponents = ['commands']
|
||||
examplesMap.each { key, value ->
|
||||
chipObjectComponents << key.toString()
|
||||
netCommComponents << key.toString()
|
||||
}
|
||||
templatesMap.each { key, value ->
|
||||
chipObjectComponents << key.toString()
|
||||
netCommComponents << key.toString()
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
|
||||
model {
|
||||
components {
|
||||
commands(NativeLibrarySpec) {
|
||||
@@ -50,10 +65,9 @@ model {
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(binary, 'shared')
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
@@ -75,10 +89,9 @@ model {
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(binary, 'shared')
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
if (binary.targetPlatform.architecture.name != 'athena') {
|
||||
lib project: ':simulation:halsim_lowfi', library: 'halsim_lowfi', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_adx_gyro_accelerometer', library: 'halsim_adx_gyro_accelerometer', linkage: 'shared'
|
||||
@@ -106,7 +119,7 @@ model {
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(binary, 'shared')
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
binary.tasks.withType(CppCompile) {
|
||||
@@ -114,7 +127,6 @@ model {
|
||||
cppCompiler.args "-Wno-error=deprecated-declarations"
|
||||
}
|
||||
}
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
if (binary.targetPlatform.architecture.name != 'athena') {
|
||||
lib project: ':simulation:halsim_lowfi', library: 'halsim_lowfi', linkage: 'shared'
|
||||
lib project: ':simulation:halsim_adx_gyro_accelerometer', library: 'halsim_adx_gyro_accelerometer', linkage: 'shared'
|
||||
|
||||
@@ -19,6 +19,14 @@ apply from: "${rootDir}/shared/opencv.gradle"
|
||||
|
||||
apply from: "${rootDir}/shared/googletest.gradle"
|
||||
|
||||
ext {
|
||||
chipObjectComponents = ['wpilibcIntegrationTests']
|
||||
netCommComponents = ['wpilibcIntegrationTests']
|
||||
useNiJava = false
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
|
||||
model {
|
||||
components {
|
||||
wpilibcIntegrationTests(NativeExecutableSpec) {
|
||||
@@ -45,10 +53,9 @@ model {
|
||||
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
project(':hal').addHalDependency(binary, 'shared')
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
||||
} else {
|
||||
binary.sources {
|
||||
simCpp(CppSourceSet) {
|
||||
|
||||
@@ -83,6 +83,14 @@ ext {
|
||||
useCpp = true
|
||||
}
|
||||
|
||||
ext {
|
||||
chipObjectComponents = ['wpilibjDev']
|
||||
netCommComponents = ['wpilibjDev']
|
||||
useNiJava = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/shared/nilibraries.gradle"
|
||||
|
||||
apply from: "${rootDir}/shared/opencv.gradle"
|
||||
|
||||
model {
|
||||
@@ -96,7 +104,6 @@ model {
|
||||
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
||||
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
||||
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
||||
lib project: ':hal', library: 'hal', linkage: 'shared'
|
||||
lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
|
||||
}
|
||||
exportedHeaders {
|
||||
@@ -105,7 +112,7 @@ model {
|
||||
}
|
||||
}
|
||||
binaries.all {
|
||||
project(':ni-libraries').addNiLibrariesToLinker(it)
|
||||
project(':hal').addHalDependency(it, 'shared')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user