WPILibC++ 2023.4.3-108-ge5452e3
EncoderData.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include "hal/Types.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15
20 HAL_NotifyCallback callback,
21 void* param,
22 HAL_Bool initialNotify);
26
28
30 HAL_NotifyCallback callback,
31 void* param,
32 HAL_Bool initialNotify);
36
38 HAL_NotifyCallback callback,
39 void* param,
40 HAL_Bool initialNotify);
43void HALSIM_SetEncoderPeriod(int32_t index, double period);
44
46 HAL_NotifyCallback callback,
47 void* param,
48 HAL_Bool initialNotify);
52
54 HAL_NotifyCallback callback,
55 void* param,
56 HAL_Bool initialNotify);
59void HALSIM_SetEncoderMaxPeriod(int32_t index, double maxPeriod);
60
62 HAL_NotifyCallback callback,
63 void* param,
64 HAL_Bool initialNotify);
68
70 int32_t index, HAL_NotifyCallback callback, void* param,
71 HAL_Bool initialNotify);
75 HAL_Bool reverseDirection);
76
78 int32_t index, HAL_NotifyCallback callback, void* param,
79 HAL_Bool initialNotify);
83
85 int32_t index, HAL_NotifyCallback callback, void* param,
86 HAL_Bool initialNotify);
89void HALSIM_SetEncoderDistancePerPulse(int32_t index, double distancePerPulse);
90
92 HAL_NotifyCallback callback,
93 void* param, HAL_Bool initialNotify);
94
95void HALSIM_SetEncoderDistance(int32_t index, double distance);
97void HALSIM_SetEncoderRate(int32_t index, double rate);
99
100#ifdef __cplusplus
101} // extern "C"
102#endif
HAL_Bool HALSIM_GetEncoderReverseDirection(int32_t index)
void HALSIM_CancelEncoderReverseDirectionCallback(int32_t index, int32_t uid)
void HALSIM_SetEncoderDistance(int32_t index, double distance)
int32_t HALSIM_GetEncoderSamplesToAverage(int32_t index)
void HALSIM_CancelEncoderPeriodCallback(int32_t index, int32_t uid)
int32_t HALSIM_RegisterEncoderDirectionCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
void HALSIM_SetEncoderSamplesToAverage(int32_t index, int32_t samplesToAverage)
HAL_Bool HALSIM_GetEncoderReset(int32_t index)
void HALSIM_SetEncoderPeriod(int32_t index, double period)
void HALSIM_SetEncoderReset(int32_t index, HAL_Bool reset)
HAL_Bool HALSIM_GetEncoderInitialized(int32_t index)
void HALSIM_CancelEncoderSamplesToAverageCallback(int32_t index, int32_t uid)
int32_t HALSIM_RegisterEncoderReverseDirectionCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
void HALSIM_SetEncoderDistancePerPulse(int32_t index, double distancePerPulse)
int32_t HALSIM_GetEncoderDigitalChannelB(int32_t index)
int32_t HALSIM_RegisterEncoderPeriodCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
HAL_SimDeviceHandle HALSIM_GetEncoderSimDevice(int32_t index)
void HALSIM_SetEncoderDirection(int32_t index, HAL_Bool direction)
void HALSIM_CancelEncoderDistancePerPulseCallback(int32_t index, int32_t uid)
HAL_Bool HALSIM_GetEncoderDirection(int32_t index)
int32_t HALSIM_GetEncoderDigitalChannelA(int32_t index)
void HALSIM_SetEncoderMaxPeriod(int32_t index, double maxPeriod)
void HALSIM_CancelEncoderMaxPeriodCallback(int32_t index, int32_t uid)
double HALSIM_GetEncoderRate(int32_t index)
void HALSIM_CancelEncoderInitializedCallback(int32_t index, int32_t uid)
void HALSIM_SetEncoderReverseDirection(int32_t index, HAL_Bool reverseDirection)
double HALSIM_GetEncoderDistance(int32_t index)
int32_t HALSIM_RegisterEncoderResetCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
int32_t HALSIM_FindEncoderForChannel(int32_t channel)
int32_t HALSIM_RegisterEncoderInitializedCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
void HALSIM_SetEncoderRate(int32_t index, double rate)
double HALSIM_GetEncoderPeriod(int32_t index)
void HALSIM_ResetEncoderData(int32_t index)
int32_t HALSIM_RegisterEncoderCountCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
int32_t HALSIM_RegisterEncoderMaxPeriodCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
void HALSIM_CancelEncoderCountCallback(int32_t index, int32_t uid)
void HALSIM_RegisterEncoderAllCallbacks(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
void HALSIM_CancelEncoderDirectionCallback(int32_t index, int32_t uid)
int32_t HALSIM_RegisterEncoderSamplesToAverageCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
double HALSIM_GetEncoderMaxPeriod(int32_t index)
void HALSIM_SetEncoderCount(int32_t index, int32_t count)
void HALSIM_CancelEncoderResetCallback(int32_t index, int32_t uid)
void HALSIM_SetEncoderInitialized(int32_t index, HAL_Bool initialized)
int32_t HALSIM_RegisterEncoderDistancePerPulseCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
double HALSIM_GetEncoderDistancePerPulse(int32_t index)
int32_t HALSIM_GetEncoderCount(int32_t index)
void(* HAL_NotifyCallback)(const char *name, void *param, const struct HAL_Value *value)
Definition: NotifyListener.h:9
constexpr auto count() -> size_t
Definition: core.h:1204
int32_t HAL_Bool
Definition: Types.h:73
HAL_Handle HAL_SimDeviceHandle
Definition: Types.h:53
::int32_t int32_t
Definition: Meta.h:57