Neues im Serviceangebot – LIS-Anbindung

Bei der Implementierung der LIS-Anbindung für mehrere Geräte eines Kunden habe ich in den letzten zwei Jahren viel Recherchiert und einige Diskussionen in einschlägigen Foren angestoßen. Seit einiger Zeit erhalte ich vermehrt E-Mails mit den Anfragen zu Beratung bei der LIS-Anbindung oder mit den Fragen zu den Spezifikation rund um LIS/ASTM/LH7. Ich werde fälschlicherweise für einen LIS-Berater gehalten.

LIS lag bis jetzt zwar nicht im Fokus meiner beruflicher Tätigkeiten, aber ich wäre nicht abgeneigt mein Serviceangebot in dem Bereich ausbauen. Wie ich Ihnen bei der Anbindung Ihrer Geräte an die LIS helfen kann, beschreibe ich auf der neuen Seite LIS-Anbindung.

 

Simple Persistence “Framework” for Qt4

This “framework” is intended for storing persistent data of small Qt4 Applications easily. It is nice, to have e.g. last used file loaded on a new start or to see the application position/size as used last time.
Unfortunatelly many small application – some prototypes or internal tools – hardly use such basic features. The reason often is the lack of time to implement such “nice-to have” stuff. There are many things to be considered format, place of data, unified load/store procedures, etc.
This framework helps to use persistency with very minimal implementation overhead. These are the steps for using it:

  1. include “persistence.h”
  2. call once macro PERSISTENCE_INIT after QApplication has been created ( usually called in main )
  3. For each item to store call once macro PERSISTENT ( usually called in constructor body of the class containing this variable or property )

That’s it. The data will be stored on exit and loaded on start.

The macro PERSISTENCE_INIT has two parameters – company name and app name e.g.: PERSISTENCE_INIT( “My Company”, “My App Name” )
The macro PERSISTENT has three parameters. There are three variants
at the moment, e.g:
PERSISTENT(“MyIntVar”, &SomeIntMember, this )
PERSISTENT(“MyStrVar”, &SomeQStringMember, this )
PERSISTENT(“MyProperty”, this, “geometry”)
The two first variants store a value of a int/QString member
The third variant stores the value of a QObject property (e.g. geometry)

Example:

#include <QtGui> 
#include "persistence.h" //(1.) include persistence "framework"
#include "slotvarmapper.h"

/// Variables to be persistent
int myIntValue=4711;
QString myStrValue="Hello";

int main(int argc, char *argv[])
{

    QApplication a(argc, argv);
    //(2.)Init persistence
    PERSISTENCE_INIT( "MyCompany", "MyTestApp" );

    //create a simple GUI containing 2 line-edits
    QWidget w;
    w.setLayout(new QVBoxLayout);
    QLineEdit *intLine = new QLineEdit (&w);
    QLineEdit *strLine = new QLineEdit (&w);
    w.layout()->addWidget(intLine);
    w.layout()->addWidget(strLine);

    //Helper instance for storing line-edit value in myIntValue
    StrSlotToIntVarMapper im( myIntValue,&w );
    QObject::connect(intLine,SIGNAL(textChanged(QString)),&im,SLOT(processSlot(QString)));

    //Helper instance for storing line-edit value in myStrValue
    StrSlotToStrVarMapper sm( myStrValue,&w );
    QObject::connect(strLine,SIGNAL(textChanged(QString)),&sm,SLOT(processSlot(QString)));

    //(3.)Declare variables and property to be pesistent. Thats ALL!
    PERSISTENT("LastIntValue", &myIntValue, 0)
    PERSISTENT("LastStrValue", &myStrValue, 0)
    PERSISTENT("LastGeometry", &w, "geometry")

    //Set initial values, or values from persistence
    intLine->setText(QString::number(myIntValue));
    strLine->setText(myStrValue);

    w.show();
    return a.exec();
    //(4.)Persistent values are stored on exit automatically
}

Project Idea: LogCompanion

LogCompanion is a tool for analyzing log-files while developing and debugging software.
Logging as a technique for debugging and error analysis is heavily used in software industry. In my experience, many companies use logging as the only debugging techniques and neglect others (e.g. such exotic one as using debugger). Whether sensible or not, the fact is, that plenty of time is spent on log-file analysis. That includes finding/(re-)opening/ log-files, looking for error (e.g. ERROR:), analyzing what happened before, analyzing what happen, if error doesn’t occur, trying to compare logs, removing timestamps in order to be able to diff files, filtering out noisy lines, removing code-line information in order to be able diff files, getting an idea why error may have happened, suspecting race-condition, looking again for corresponding timestamps, looking again for corresponding code-line information, trying to identify the place in code, copying/renaming usefull log-files/sessions, and so on.

Imagine, a software would save the log-files you’ve analyzed last time, and monitor them for changes or even for error-tags. It would recognize automatically the tags in log-lines such as file-names, lines, timestamps, error-levels, messages, etc. It would use the information sensible depending on context e.g ignoring timestamps while comparing sequences of commands, opening file on specified line in IDE, showing time-spans between lines, displaying error-level as an icon, etc. Imagine, it would even detect unusual behavior e.g prohibited sequences, time-outs, invalid values etc. How much faster would you be able to develop your software then? Much faster! LogCompanion will help you in that.

I am currently working on first prototype and I hope to publish the code soon. The prototype is developed in Qt4, of cause :-). While the prototype is evolving, I am still collecting requirements and feature ideas. Therefore this site was created. If you have a question, an idea or a suggestions, I would appreciate your message. If you are aware of such a software, free or commercial for reasonable prize, I would appreciate, If you gave me a hint – reinventing a wheel is always a pain.

Here are the key features I am aiming to implement:

  • easy definition of log format
  • auto-recognition of known log formats:
  • Automatic Error-detection in using logging APIs (extra/missing newlines etc)
  • auto-recognition of log data
    • timestamps
    • file-names and line numbers
    • URIs
  • outstanding filtering abilities
  • comparing logs using defined filter criteria
  • extensive usage of intuitive GUI-techniques
    • Drag&Drop
    • Semitransparent dialogs
    • actions on mouse over
    • gestures
  • syncing several log-files using time-stamp
  • configurable presentation of log entries
    • Icons
    • recognition of URIs
    • replacement of integer values by symbols
    • summing up same/similar consecutive log lines
  • preview of log-data items
    • Mimes
    • Code-Chunks
  • conversion to all known formats
  • auto-recognition of known formats
  • pre-defined configurations for all known formats
  • conversion to XML
  • HTML report generation
  • “tail -f” replacement
  • real time log transformation and forwarding (to file, network, etc.)
  • log data input from network connection (e.g. piping via nc)
  • log joining
  • log collection
  • input from several network connections
  • “tailing -f” several files
  • code generation for input/parsing plug-ins based on format description
  • unusual sequences detection
  • repetition detection
  • block comparison
    • N lines beginning with specified line
    • All lines between specified lines
  • Log-rotate with compression
  • alarming
    • sound
    • email
  • Status information
    • last update, a warning sign, if file older than specified time
  • Replay of cuptured events.
  • Splitting Log into several pre-defined Log-Classes. e.g. Errors, Messages of a particular developer, Strange behaviour
  • Acting as multi-client proxy server for TCP/UDP protocolls and capturing data passed through.

Einige alte Projekte

Nach dem Umbau der Webseite habe ich erst-mal die alten Projekte gelöscht. Überraschenderweise wurde ich hin und wieder von den Besuchern angeschrieben, die ein altes Link auf der Webseite nicht mehr gefunden haben. Die Anfragen nach den alten Projekten oder Artikeln haben mich natürlich sehr gefreut, und ich stelle die Dateien gerne wieder zur Verfügung.

Shape Widget – Ein Beispiel, wie man ein Widget in Qt3 in beliebiger Form darstellt. Für Qt4 habe ich die Portierung sehr freundlicher weise von Falko Buttler bekommen. Allerdings würde ich dieses Problem in Qt4 z.Z. mit Stylesheets und transparenten Pixmaps lösen.

Kezb – Ein Tool um beliebige Zeichen von einer Standardtastatur einzugeben. Ich habe es selbst lange benutzt um mit deutscher Tastatur kyrilisch zu schreiben. Mittlerweile benutzt ich allerdings dafür www.translit.ru.

GOTO Ireland: – Meine Erfahrung als Jobsuchender in Irland.

J2ME – Getting Started – Kurze J2ME Einführung. Ich habe sie geschrieben, als ich meine ersten Schritte mit Java-Programmierung für ein Siemens-Handy gemacht habe.

Subtitle assistant – Ein kleines C++ Projekt um aus DVD-Untertiteln Wortlisten mit Übersetzung und Anwendungsbeispielen zu erzeugen.