48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace CartActivator
|
|
{
|
|
public class LogicRunOnMCUAttribute:Attribute
|
|
{
|
|
public string mcu_url = "default";
|
|
public int scanInterval = 50;
|
|
}
|
|
|
|
public class RunOnMCU
|
|
{
|
|
// if return null: not data, or return payload data excluding CRC
|
|
public static byte[] ReadEvent(int port, int event_id) => default;
|
|
|
|
public static void WriteEvent(byte[] payload, int port, int event_id) { }
|
|
|
|
// if return null: not data.
|
|
public static byte[] ReadStream(int port) => default;
|
|
|
|
public static void WriteStream(byte[] payload, int port){}
|
|
|
|
// always have the same sized data.
|
|
public static byte[] ReadSnapshot() => default;
|
|
|
|
public static void WriteSnapshot(byte[] payload)
|
|
{
|
|
}
|
|
|
|
public static T BytesToStruct<T>() where T: struct => default;
|
|
|
|
public static byte[] StructToBytes<T>(T what) where T : struct => default;
|
|
|
|
public static int GetMillisFromStart() => default;
|
|
|
|
public static T Iterate<T>(IEnumerable<T> ie) => default;
|
|
}
|
|
|
|
public class MCUManager
|
|
{
|
|
public static void Use<T>()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|