Die Pronisation der Dinge - wiki.raumzeitlabor.de · Tobias Rehbein / blabber libpronisate...

Post on 04-Jun-2018

218 views 0 download

Transcript of Die Pronisation der Dinge - wiki.raumzeitlabor.de · Tobias Rehbein / blabber libpronisate...

Die Pronisation der Dinge

Tobias Rehbein / blabber

21. Februar 2011

Tobias Rehbein / blabber () libpronisate 21.02.2011 1 / 34

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 2 / 34

Motivation

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 3 / 34

Motivation PRON-Wall

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 4 / 34

Motivation PRON-Wall

LED-Panel

LEDs pro Panel: 32 x 32 (=1024)Farbe der LEDs: rotAbstand der LEDs (Mitte-Mitte / horizontal & vertikal): 2 cmPanelfläche: 64 x 64 cm

Tobias Rehbein / blabber () libpronisate 21.02.2011 5 / 34

Motivation PRON-Wall

Panel Rückseite

Tobias Rehbein / blabber () libpronisate 21.02.2011 6 / 34

Motivation PRON-Wall

Panel Testdrive

Tobias Rehbein / blabber () libpronisate 21.02.2011 7 / 34

Motivation PRON-Wall

LED-Wall

8 PanelsGesamtfläche: 128 x 256 cmGesamtzahl LEDs: 8192

Tobias Rehbein / blabber () libpronisate 21.02.2011 8 / 34

Motivation PRON-Wall

Soll- & Ist-Zustand

Gegenwart

ein Panel betriebsbereitLaborboardzweistufige Animationen

Zukunft

je Panel ein Controllerein zentraler ControllerAnsteuerung über Ethernet

Tobias Rehbein / blabber () libpronisate 21.02.2011 9 / 34

Motivation PRON-Wall

Soll- & Ist-Zustand

Gegenwartein Panel betriebsbereitLaborboardzweistufige Animationen

Zukunft

je Panel ein Controllerein zentraler ControllerAnsteuerung über Ethernet

Tobias Rehbein / blabber () libpronisate 21.02.2011 9 / 34

Motivation PRON-Wall

Soll- & Ist-Zustand

Gegenwartein Panel betriebsbereitLaborboardzweistufige Animationen

Zukunftje Panel ein Controllerein zentraler ControllerAnsteuerung über Ethernet

Tobias Rehbein / blabber () libpronisate 21.02.2011 9 / 34

Motivation PRON-Wall

Soll- & Ist-Zustand

Gegenwartein Panel betriebsbereitLaborboardzweistufige Animationen

Zukunftje Panel ein Controllerein zentraler ControllerAnsteuerung über Ethernet

Tobias Rehbein / blabber () libpronisate 21.02.2011 9 / 34

Motivation PRON-Wall Protokoll

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 10 / 34

Motivation PRON-Wall Protokoll

RZL1337 - Pron-Wall Protocol (Juli 2011)

4.1 Image Frame0 8 16 24 32+---+---+---+---+---+| C | TIME | SEQ |+---+---+---+---+---+| PIXELS ...----------...

C ... type of frame (see 4.2)TIME ... duration in milliseconds frame will be

displayedSEQ ... will be used for retransmissionsPIXEL ... each pixel is represented by a single

byte, containing the brightness levelof this pixel

Tobias Rehbein / blabber () libpronisate 21.02.2011 11 / 34

Motivation Pronisation

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 12 / 34

Motivation Pronisation

Definitionen

Pronisation bezeichnet den Vorgang der aus einer Grafik einen Bytestromerzeugt in welchem jedes Pixel durch ein Byte, welches demHelligkeitswert des Pixels entspricht, repräsentiert wird.

Pronisat bezeichnet das Resultat einer Pronistation.

Tobias Rehbein / blabber () libpronisate 21.02.2011 13 / 34

Das Pronisationsverfahren

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 14 / 34

Das Pronisationsverfahren

HSL-Farbraum

Tobias Rehbein / blabber () libpronisate 21.02.2011 15 / 34

Das Pronisationsverfahren

Verfahren

zeilenweise, von links nach rechts, jeden Pixel im HSL-FarbraumbetrachtenLightness als Byte in Bytestrom schreiben (0 = maximal dunkel, 255 =maximal hell)

Tobias Rehbein / blabber () libpronisate 21.02.2011 16 / 34

Das Pronisationsverfahren

Verfahren

zeilenweise, von links nach rechts, jeden Pixel im HSL-FarbraumbetrachtenLightness als Byte in Bytestrom schreiben (0 = maximal dunkel, 255 =maximal hell)

Tobias Rehbein / blabber () libpronisate 21.02.2011 16 / 34

Das Pronisationsverfahren

Pronisat

Tobias Rehbein / blabber () libpronisate 21.02.2011 17 / 34

Das Pronisationsverfahren

Pronisat

Tobias Rehbein / blabber () libpronisate 21.02.2011 17 / 34

Das Pronisationsverfahren

Pronisat

Tobias Rehbein / blabber () libpronisate 21.02.2011 17 / 34

Die Implementierung

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 18 / 34

Die Implementierung Fakten

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 19 / 34

Die Implementierung Fakten

libpronisate

Bibliothek implementiert in Cverwendet die MagickWand API von ImageMagickkann Grafiken pronisieren, sonst nichts

erzeugt insbesondere keine Ethernet Frames

Tobias Rehbein / blabber () libpronisate 21.02.2011 20 / 34

Die Implementierung Fakten

libpronisate

Bibliothek implementiert in Cverwendet die MagickWand API von ImageMagickkann Grafiken pronisieren, sonst nichtserzeugt insbesondere keine Ethernet Frames

Tobias Rehbein / blabber () libpronisate 21.02.2011 20 / 34

Die Implementierung Fakten

Features

kann mit Animationen umgehenkann über 100 Grafikformate verarbeitenkann mit Transparenz umgehenskaliert eingelesene Grafiken

kann über Bande auch mit Blinkenlights Filmen umgehen (blinkentools:b2mng, b2gif)

Tobias Rehbein / blabber () libpronisate 21.02.2011 21 / 34

Die Implementierung Fakten

Features

kann mit Animationen umgehenkann über 100 Grafikformate verarbeitenkann mit Transparenz umgehenskaliert eingelesene Grafikenkann über Bande auch mit Blinkenlights Filmen umgehen (blinkentools:b2mng, b2gif)

Tobias Rehbein / blabber () libpronisate 21.02.2011 21 / 34

Die Implementierung Fakten

Todo

multi panel support (WIP)error messagingFarben (?)

Tobias Rehbein / blabber () libpronisate 21.02.2011 22 / 34

Die Implementierung Anwendung (Code)

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 23 / 34

Die Implementierung Anwendung (Code)

Initialisierung

p r on_ in i t ( ) ;

s t ruct pron_context ∗ c t x =pron_context_open ( " image . png" , 32 , 3 2 ) ;

p ron_context_c lose ( c t x ) ;

p r on_de i n i t ( ) ;

Tobias Rehbein / blabber () libpronisate 21.02.2011 24 / 34

Die Implementierung Anwendung (Code)

Schleife (Animationen)

p r on_ in i t ( ) ;

s t ruct pron_context ∗ c t x =pron_context_open ( " image . png" , 32 , 3 2 ) ;

fo r ( i n t f = 0 ; f < pron_get_frame_count ( c t x ) ; f++) {

}

pron_context_c lose ( c t x ) ;

p r on_de i n i t ( ) ;

Tobias Rehbein / blabber () libpronisate 21.02.2011 25 / 34

Die Implementierung Anwendung (Code)

Pronisation

p r on_ in i t ( ) ;

s t ruct pron_context ∗ c t x =pron_context_open ( " image . png" , 32 , 3 2 ) ;

fo r ( i n t f = 0 ; f < pron_get_frame_count ( c t x ) ; f++) {p ron_pron i s a t e ( ctx , f ) ;

}

pron_context_c lose ( c t x ) ;

p r on_de i n i t ( ) ;

Tobias Rehbein / blabber () libpronisate 21.02.2011 26 / 34

Die Implementierung Anwendung (Code)

Pronisat verwenden

p r on_ in i t ( ) ;

s t ruct pron_context ∗ c t x =pron_context_open ( " image . png" , 32 , 3 2 ) ;

fo r ( i n t f = 0 ; f < pron_get_frame_count ( c t x ) ; f++) {p ron_pron i s a t e ( ctx , f ) ;unsigned char ∗ s = pron_get_stream ( c t x ) ;do_foo ( s ) ; /∗ z .B . pe r E the rn e t v e r s enden ∗/

}

pron_context_c lose ( c t x ) ;

p r on_de i n i t ( ) ;

Tobias Rehbein / blabber () libpronisate 21.02.2011 27 / 34

Andere Projekte

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 28 / 34

Andere Projekte libledwall

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 29 / 34

Andere Projekte libledwall

libledwall

Lutomas Clientbibliothek für die PRON-Wallbisheriger Funktionsumfang: Öffnet einen Raw-Socket auf OSI-Layer 2Status: inaktiv

Deine Chance einzusteigen

Tobias Rehbein / blabber () libpronisate 21.02.2011 30 / 34

Andere Projekte libledwall

libledwall

Lutomas Clientbibliothek für die PRON-Wallbisheriger Funktionsumfang: Öffnet einen Raw-Socket auf OSI-Layer 2Status: inaktiv

Deine Chance einzusteigen

Tobias Rehbein / blabber () libpronisate 21.02.2011 30 / 34

Andere Projekte libledwall

libledwall

Lutomas Clientbibliothek für die PRON-Wallbisheriger Funktionsumfang: Öffnet einen Raw-Socket auf OSI-Layer 2Status: inaktiv

Deine Chance einzusteigen

Tobias Rehbein / blabber () libpronisate 21.02.2011 30 / 34

Andere Projekte pron-ledwall-designer

1 MotivationPRON-WallPRON-Wall ProtokollPronisation

2 Das Pronisationsverfahren

3 Die ImplementierungFaktenAnwendung (Code)

4 Andere Projektelibledwallpron-ledwall-designer

Tobias Rehbein / blabber () libpronisate 21.02.2011 31 / 34

Andere Projekte pron-ledwall-designer

pron-ledwall-designer

Elses Designer zur Erstellung und Betrachtung von PRON-Sequenzenimplementiert in Javafreie Anordnung der PanelsStatus: ???

Tobias Rehbein / blabber () libpronisate 21.02.2011 32 / 34

Andere Projekte pron-ledwall-designer

pron-ledwall-designer

Elses Designer zur Erstellung und Betrachtung von PRON-Sequenzenimplementiert in Javafreie Anordnung der PanelsStatus: ???

Tobias Rehbein / blabber () libpronisate 21.02.2011 32 / 34

Andere Projekte pron-ledwall-designer

Screen

Tobias Rehbein / blabber () libpronisate 21.02.2011 33 / 34

Andere Projekte pron-ledwall-designer

Ende

Vielen Dank für die Aufmerksamkeit

github .com/blabber/ libpronisate

Tobias Rehbein / blabber () libpronisate 21.02.2011 34 / 34