risistemato lettura strobe/ack x MST...
This commit is contained in:
@@ -342,6 +342,51 @@ namespace MTC_Adapter
|
||||
sendWatchDog();
|
||||
}
|
||||
/// <summary>
|
||||
/// Scrive ACK x dati MST
|
||||
/// </summary>
|
||||
/// <param name="idxPath"></param>
|
||||
/// <param name="memIndexMST"></param>
|
||||
/// <param name="MemBlock_W"></param>
|
||||
/// <returns></returns>
|
||||
public override bool writeMST_ACK(int memIndexAck, ref byte[] currACK_DW)
|
||||
{
|
||||
bool fatto = false;
|
||||
try
|
||||
{
|
||||
inizio = DateTime.Now;
|
||||
fatto = OsaiMemRW_Byte(W, OSAI.MemTypeWord.MW_CODE, memIndexAck, 0, ref currACK_DW);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", currACK_DW.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(string.Format("Errore in scrittura dati ACK MST:{0}{1}", Environment.NewLine, exc));
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Legge area memoria dati MST
|
||||
/// </summary>
|
||||
/// <param name="idxPath"></param>
|
||||
/// <param name="memIndexMST"></param>
|
||||
/// <param name="MemBlock_W"></param>
|
||||
/// <returns></returns>
|
||||
public override bool readMST_data(int idxPath, int memIndexMST, ref ushort[] MemBlock_W)
|
||||
{
|
||||
bool fatto = false;
|
||||
try
|
||||
{
|
||||
// leggo tutto!!!
|
||||
inizio = DateTime.Now;
|
||||
fatto = OsaiMemRW_Word(R, OSAI.MemTypeWord.MW_CODE, memIndexMST, ref MemBlock_W);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW1-P{1:00}", MemBlock_W.Length, idxPath), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(string.Format("Errore in lettura dati MST:{0}{1}", Environment.NewLine, exc));
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Scrive watchdog
|
||||
/// </summary>
|
||||
/// <param name="retACK_DW"></param>
|
||||
|
||||
Reference in New Issue
Block a user