Flight Recorder (FRd) -- logger plugin via Xtalk

Xlobby plugin development

Flight Recorder (FRd) -- logger plugin via Xtalk

Postby P3rv3rt B3ar on Sun Aug 31, 2008 8:54 pm

Ok my loggin plugin beta should be up for download now. As usual use it with your own responsibility, this time u r also solely responsible for privacy of your end users, so lets use this like civilized human beings, shall we? :D

Xtalk is more familiar to u as pervtalk but im thinking to make little centralized download site for all devices so far and figured that this would be good time to start to implement the name change.

Flight recorder can log any xl variable (or more generally Xtalk variable) into a log file. Flight Recorder requires beforehand set xt-environment with xthub and needed devices. If u r new for xtalk Look xpert thread how to set everything up.

U fire up FRd with following commandline:

Code: Select all
FlightRecorder alias configfile


where "alias" is xtalk name for this particular instance of the device. and "configfile" is the filename of ".ini" file without extension which tells flightrecorder what to record and where. Ull need to type this file by hand and instructions how to do so will follow.

as usual u can put the above line in your "autorun.ini" file to be launched as pt-environment is brought up.

Before u run program, however, u need to manually create "logs" directory within your PervWare folder. That is where FlightRecorder will store all its recordings.

When flightrecorder is launched it will start automaticly in recording state.
Image
P3rv3rt B3ar
 
Posts: 1367
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: Flight Recorder (FRd) -- logger plugin via Xtalk

Postby P3rv3rt B3ar on Sun Aug 31, 2008 9:14 pm

Format of configuration file is following:

Code: Select all
LogFilenameA FileManagementPolicyA XTalkNameA1;VariableA1 XTalkNameA2;VariableA2 ... XTalkNameAX;VariableAX
LogFilenameB FileManagementPolicyB XTalkNameB1;VariableB1 XTalkNameB2;VariableB2 ... XTalkNameBX;VariableBX
.
.
.
LogFilenameN FileManagementPolicyN XTalkNameN1;VariableN1 XTalkNameN2;VariableN2 ... XTalkNameNX;VariableNX


Or in simple english each line of config file specifies one separate output (or log) file, its management policy and variables recorded to it. Options for FMP or file management policy are "overwrite" and "runbased". As name suggest overwrite means that single file is written again in each run where as runbased makes a new file for each run.

There can be n amount of variables written to same file variables are given as ";"-separated pair of pervtalk name of device variable is subscribed from and name of variable itself.

Simple configuration file which keeps tap on current screen and now playing variables of xlobby and stores them into separate files could be:

Code: Select all
played runbased XLobby;variable>audioplayer>now>%artist% XLobby;variable>audioplayer>now>%trackname%
screens_visited overwrite XLobby;variable>%screenname%


And here is example of configuration file for those who want to use FlightRecorder together with my ELM device, this one logs both speed and RPM to a single file:

Code: Select all
lap runbased Pervette;speed Pervette;rpm
Last edited by P3rv3rt B3ar on Thu Sep 04, 2008 4:41 pm, edited 1 time in total.
Image
P3rv3rt B3ar
 
Posts: 1367
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: Flight Recorder (FRd) -- logger plugin via Xtalk

Postby P3rv3rt B3ar on Sun Aug 31, 2008 9:38 pm

As u can see in this test version of sharkskin, theres controls for FRd and that little red dot (rec symbol) which tells wether or not FRd is logging. to get the red dot to appear ur screen u r gonna need this text field variable and suitable graphix:

Code: Select all
plugin>xPerT>loadpic>normal>[plugin>xPerT>if>[plugin>xPerT>Variable>recID>logger>rec]>skin:/buttons/record.png]


this assumes that alias for your FRd is "logger" and that ID of the text field is "recID" and graphix u made for icon are stored in your skin's buttons folder under name "record.png".

Two commands, the functionality behind start and stop buttons are "StopAllRecording" and "StartRecordingConfig" as name suggest first simply stops logging activity and second one without any parameters restarts recording based on currently loaded configuration file. notice that this counts as new run for file management policy. Second command can also take one parameter, which is, if given name of the configuration file without ".ini" extension, this makes it possible to change the recording configuration on fly. Heres example how to use first command:

Code: Select all

plugin

xPerT

Delegate

logger;StopAllRecording


notice this example assumes that xtalk alias for your FRd instance is "logger"

as usual, if u find these instrucitons to be insufficient, just ask. :D
Attachments
Image(217).jpg
BTW those numbers are speed and rpm from ELMd, i just had not time to make analog gauges yet
Last edited by P3rv3rt B3ar on Thu Sep 04, 2008 4:43 pm, edited 1 time in total.
Image
P3rv3rt B3ar
 
Posts: 1367
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: Flight Recorder (FRd) -- logger plugin via Xtalk

Postby P3rv3rt B3ar on Thu Sep 04, 2008 2:12 pm

Just to give a peek how log files will look heres a little excerpt of one of my grandma lap log file:

Code: Select all
2008/08/30 17:16:34.563 <Pervette_rpm> 1050
2008/08/30 17:16:35.895 <Pervette_speed> 57
2008/08/30 17:16:36.145 <Pervette_rpm> 1494
2008/08/30 17:16:37.517 <Pervette_speed> 66
2008/08/30 17:16:37.757 <Pervette_rpm> 3120
2008/08/30 17:16:38.018 <Pervette_speed> 72
2008/08/30 17:16:39.380 <Pervette_rpm> 3852
2008/08/30 17:16:39.630 <Pervette_speed> 92
2008/08/30 17:16:40.992 <Pervette_rpm> 4681
2008/08/30 17:16:41.252 <Pervette_speed> 113
2008/08/30 17:16:41.513 <Pervette_rpm> 4941
2008/08/30 17:16:41.773 <Pervette_speed> 119
2008/08/30 17:16:42.084 <Pervette_rpm> 5285
2008/08/30 17:16:42.314 <Pervette_speed> 125
2008/08/30 17:16:43.676 <Pervette_rpm> 4706
2008/08/30 17:16:43.976 <Pervette_speed> 137


As u can see in each row theres first time stamp (of recording instant), then recorded variable in <> angled brackets and finally recorded value itself.
Image
P3rv3rt B3ar
 
Posts: 1367
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: Flight Recorder (FRd) -- logger plugin via Xtalk

Postby Marbles_00 on Thu Sep 04, 2008 2:18 pm

Come on P3rv, if your going to show the log of the vehicle speed, let's see that kat purr and see a log with a speed 200+ (unless that report is in miles and not kilometers, then I stand corrected :D ).
Image
Mayhem Creations
where my:
    -Music Distribution
    -HTPC
    -MediaPVR
    -UnRAID box
    -OTA
are all discussed.

Xlobby Free Zone
Marbles_00
 
Posts: 1882
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Flight Recorder (FRd) -- logger plugin via Xtalk

Postby P3rv3rt B3ar on Thu Sep 04, 2008 4:49 pm

haha ill make faster test run sometime :D

I made some corrections to the documentation:

- separator character is ";" and not ":" like originally errorously stated.
- changed command in example to "StopAllRecording" simply because theres no "StartAllRecording" command.

i should pay more attention to documenting next time. :lol:
Image
P3rv3rt B3ar
 
Posts: 1367
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland


Return to Plugins

Who is online

Users browsing this forum: No registered users and 2 guests

cron