Counter::Counter(AnalogTrigger &trigger)
{
	InitCounter();
	SetUpSource(trigger.CreateOutput(AnalogTriggerOutput::kState));
	ClearDownSource();
	m_allocatedUpSource = true;
}
예제 #2
0
/**
 * Create an instance of a Counter object.
 * Create an instance of an up-Counter given a digital module and a channel.
 * @param moduleNumber The digital module (1 or 2).
 * @param channel The channel in the digital module
 */
Counter::Counter(UINT8 moduleNumber, UINT32 channel) :
	m_upSource(NULL),
	m_downSource(NULL),
	m_counter(NULL)
{
	InitCounter();
	SetUpSource(moduleNumber, channel);
	ClearDownSource();
}
예제 #3
0
/**
 * Create an instance of a Counter object.
 * Create an up-Counter instance given a channel. The default digital module is assumed.
 */
Counter::Counter(UINT32 channel) :
	m_upSource(NULL),
	m_downSource(NULL),
	m_counter(NULL)
{
	InitCounter();
	SetUpSource(channel);
	ClearDownSource();
}
예제 #4
0
Counter::Counter(DigitalSource &source) :
	m_upSource(NULL),
	m_downSource(NULL),
	m_counter(NULL)
{
	InitCounter();
	SetUpSource(&source);
	ClearDownSource();
}
예제 #5
0
파일: Counter.cpp 프로젝트: 0xacf/wpilib
/**
 * Create an instance of a Counter object.
 * Create an instance of an up-Counter given a digital module and a channel.
 * @param moduleNumber The digital module (1 or 2).
 * @param channel The channel in the digital module
 */
Counter::Counter(uint8_t moduleNumber, uint32_t channel) :
	m_upSource(NULL),
	m_downSource(NULL),
	m_counter(NULL)
{
	InitCounter();
	SetUpSource(moduleNumber, channel);
	ClearDownSource();
}
예제 #6
0
/**
 * Create an instance of a Counter object.
 * Create an up-Counter instance given a channel. The default digital module is assumed.
 */
xCounter::xCounter(UINT32 channel) :
	m_upSource(NULL),
	m_downSource(NULL),
	m_counter(NULL),
	m_encodingType(k1X)
{
	InitCounter();
	SetUpSource(channel);
	ClearDownSource();
}
예제 #7
0
xCounter::xCounter(DigitalSource &source) :
	m_upSource(NULL),
	m_downSource(NULL),
	m_counter(NULL),
	m_encodingType(k1X)
{
	InitCounter();
	SetUpSource(&source);
	ClearDownSource();
}
예제 #8
0
/**
 * Create an instance of a Counter object.
 * Create an instance of a simple up-Counter given an analog trigger.
 * Use the trigger state output from the analog trigger.
 */
Counter::Counter(AnalogTrigger *trigger) :
	m_upSource(NULL),
	m_downSource(NULL),
	m_counter(NULL)
{
	InitCounter();
	SetUpSource(trigger->CreateOutput(AnalogTriggerOutput::kState));
	ClearDownSource();
	m_allocatedUpSource = true;
}
예제 #9
0
xCounter::xCounter(AnalogTrigger &trigger) :
	m_upSource(NULL),
	m_downSource(NULL),
	m_counter(NULL),
	m_encodingType(k1X)
{
	InitCounter();
	SetUpSource(trigger.CreateOutput(AnalogTriggerOutput::kState));
	ClearDownSource();
	m_allocatedUpSource = true;
}
/**
 * Create an instance of a Counter object.
 * Create an instance of an up-Counter given a digital module and a channel.
 * @param slot The cRIO chassis slot for the digital module used
 * @param channel The channel in the digital module
 */
Counter::Counter(UINT32 slot, UINT32 channel)
{
	InitCounter();
	SetUpSource(slot, channel);
	ClearDownSource();
}
Counter::Counter(DigitalSource &source)
{
	InitCounter();
	SetUpSource(&source);
	ClearDownSource();
}