aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Threading/IDispatcherProvider.cs
blob: 1c960ed3a03ba9aadd353274aa8d554fc31841bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.MachineStudio.Common.Threading
{
    /// <summary>
    /// Represents a mechanism for invoking actions on the main application thread.
    /// </summary>
    public interface IDispatcherProvider
    {
        /// <summary>
        /// Invokes the specified action asynchronously.
        /// </summary>
        /// <param name="action">The action.</param>
        void Invoke(Action action);

        /// <summary>
        /// Invokes the specified action synchronously.
        /// </summary>
        /// <param name="action">The action.</param>
        void InvokeSync(Action action);
    }
}
> MSecFptr Callback); int32_t MillisecSetScrewSpeed(unsigned long Data, int Length, MSecFptr Callback); int32_t MillisecSetMotorSpeed(TimerMotors_t MotorId, unsigned long Data, int Length, MSecFptr Callback); int32_t MillisecReadFromMotor(TimerMotors_t MotorId, unsigned long Data, int Length, MSecFptr Callback); int MillisecFlushMsgQ(TimerMotors_t MotorId); int32_t MillisecReadFromTempSensor(uint32_t TempSensorId, MSecFptr Callback); int MillisecFlushMsgQ(TimerMotors_t MotorId); /* uint32_t getMotorStatusData(int MotorId); uint32_t getMotorSpeedData(int MotorId); uint32_t getTemperatureSensorData(int SensorId); uint32_t getADCData(int DeviceId); */ float getSensorSpeedData(void); uint32_t getDrawerFansStatus(void); uint32_t getSystemFansStatus(void); uint8_t getGasReading(void); int MillisecGetTemperatures (TEMPERATURE_SENSOR_ID_ENUM SensorId); float MillisecGetPressures (int SensorId); void setRapidPressureRead(bool value); void MillisecInit(void); void MillisecStop(void); void MillisecStart(void); #ifdef HUNDRED_MICROSECONDS_DANCER_READ void SaveLogData(void); void MillisecLogInit(void); void MillisecLogClose(void); #endif extern bool watchdogCriticalAlarm; extern Task_Handle Millisecond_Task_Handle; #endif /* MODULES_CONTROL_MILLISECTASK_H_ */