public EVENT_TO_WRITE WriteLPREvent(FRAME frame) { EVENT_TO_WRITE eventData = new EVENT_TO_WRITE(); lineFields[(int)FIELDS_ON_BUILDING_STRING.EVENT] = BuildPlateField(frame); lineFields[(int)FIELDS_ON_BUILDING_STRING.PSS_NAME] = frame.PSSName; lineFields[(int)FIELDS_ON_BUILDING_STRING.TIME_STAMP] = frame.TimeStamp.ToString(m_AppData.TimeFormatStringForFileNames); lineFields[(int)FIELDS_ON_BUILDING_STRING.SOURCE_CAMERA_NAME] = frame.SourceName; if (frame.GPSPosition.Contains("No Position")) { frame.GPSPosition = "No Position Available, No position Available"; // once for lat and once for lon } lineFields[(int)FIELDS_ON_BUILDING_STRING.GPS_LOCATION] = frame.GPSPosition; lineFields[(int)FIELDS_ON_BUILDING_STRING.JPEGFILE_RELATIVE_PATH] = frame.JpegFileRelativePath; string line = BuildLine(lineFields) + "\r\n"; string file = m_PathManager.GetEventLogFilePath(frame.TimeStamp, frame.SourceName); eventData.file = file; eventData.line = line; eventData.directory = m_PathManager.GetEventLogDirectoryPath(frame.TimeStamp, frame.SourceName); return(eventData); //lock (m_FileLock) //{ // CreateLogDirectory(m_PathManager.GetEventLogDirectoryPath(frame.TimeStamp, frame.SourceName)); // File.AppendAllText(file, line); //} }
public EVENT_TO_WRITE WriteMotoinEvent(string PSSName, DateTime timeStamp, string sourceName, string GPSLocation, string jpegRelativePath) { EVENT_TO_WRITE eventData = new EVENT_TO_WRITE(); lineFields[(int)FIELDS_ON_BUILDING_STRING.EVENT] = "MOTION,"; /// the extra comma is for the blank field where the plate number would go lineFields[(int)FIELDS_ON_BUILDING_STRING.PSS_NAME] = PSSName; lineFields[(int)FIELDS_ON_BUILDING_STRING.TIME_STAMP] = timeStamp.ToString(m_AppData.TimeFormatStringForFileNames); lineFields[(int)FIELDS_ON_BUILDING_STRING.SOURCE_CAMERA_NAME] = sourceName; if (GPSLocation.Contains("No Position")) { GPSLocation = "No Position Available, No position Available"; // once for lat and once for lon } lineFields[(int)FIELDS_ON_BUILDING_STRING.GPS_LOCATION] = GPSLocation; lineFields[(int)FIELDS_ON_BUILDING_STRING.JPEGFILE_RELATIVE_PATH] = jpegRelativePath; string line = BuildLine(lineFields) + "\r\n"; string file = m_PathManager.GetEventLogFilePath(timeStamp, sourceName); eventData.file = file; eventData.line = line; eventData.directory = m_PathManager.GetEventLogDirectoryPath(timeStamp, sourceName); return(eventData); }
public EVENT_TO_WRITE WriteMotoinEvent(string PSSName, DateTime timeStamp, string sourceName, string GPSLocation, string jpegRelativePath) { EVENT_TO_WRITE eventData = new EVENT_TO_WRITE(); lineFields[(int)FIELDS_ON_BUILDING_STRING.EVENT] = "MOTION,"; /// the extra comma is for the blank field where the plate number would go lineFields[(int)FIELDS_ON_BUILDING_STRING.PSS_NAME] = PSSName; lineFields[(int)FIELDS_ON_BUILDING_STRING.TIME_STAMP] = timeStamp.ToString(m_AppData.TimeFormatStringForFileNames); lineFields[(int)FIELDS_ON_BUILDING_STRING.SOURCE_CAMERA_NAME] = sourceName; if (GPSLocation.Contains("No Position")) { GPSLocation = "No Position Available, No position Available"; // once for lat and once for lon } lineFields[(int)FIELDS_ON_BUILDING_STRING.GPS_LOCATION] = GPSLocation; lineFields[(int)FIELDS_ON_BUILDING_STRING.JPEGFILE_RELATIVE_PATH] = jpegRelativePath; string line = BuildLine(lineFields) + "\r\n"; string file = m_PathManager.GetEventLogFilePath(timeStamp, sourceName); eventData.file = file; eventData.line = line; eventData.directory = m_PathManager.GetEventLogDirectoryPath(timeStamp, sourceName); return (eventData); }
public EVENT_TO_WRITE WriteLPREvent(FRAME frame) { EVENT_TO_WRITE eventData = new EVENT_TO_WRITE(); lineFields[(int)FIELDS_ON_BUILDING_STRING.EVENT] = BuildPlateField(frame); lineFields[(int)FIELDS_ON_BUILDING_STRING.PSS_NAME] = frame.PSSName; lineFields[(int)FIELDS_ON_BUILDING_STRING.TIME_STAMP] = frame.TimeStamp.ToString(m_AppData.TimeFormatStringForFileNames); lineFields[(int)FIELDS_ON_BUILDING_STRING.SOURCE_CAMERA_NAME] = frame.SourceName; if ( frame.GPSPosition.Contains("No Position")) { frame.GPSPosition = "No Position Available, No position Available"; // once for lat and once for lon } lineFields[(int)FIELDS_ON_BUILDING_STRING.GPS_LOCATION] = frame.GPSPosition; lineFields[(int)FIELDS_ON_BUILDING_STRING.JPEGFILE_RELATIVE_PATH] = frame.JpegFileRelativePath; string line = BuildLine(lineFields) + "\r\n"; string file = m_PathManager.GetEventLogFilePath(frame.TimeStamp, frame.SourceName); eventData.file = file; eventData.line = line; eventData.directory = m_PathManager.GetEventLogDirectoryPath(frame.TimeStamp, frame.SourceName); return (eventData); //lock (m_FileLock) //{ // CreateLogDirectory(m_PathManager.GetEventLogDirectoryPath(frame.TimeStamp, frame.SourceName)); // File.AppendAllText(file, line); //} }