X11::Protocol::Ext::SYNC -- Perl extention module for X Synchronization Extension Protocol
use X11::Protocol; $x = X11::Protocol->new($ENV{DISPLAY}); $x->init_extension('SYNC') or die;
This module is used by the X11::Protocol(3pm) module to participate in the synchronization extension to the X protocol, allowing time synchronization between clients and to absolute real-time sources per the "X Synchronization Extension Protocol", a copy of which can be obtained from http://www.x.org/releases/X11R7.7/doc/xextproto/sync.pdf.
This manual page does not attempt to document the protocol itself, see the specification for that. It documents the "CONSTANTS", "REQUESTS", "EVENTS" and "ERRORS" that are added to the X11::Protocol(3pm) module.
X11::Protocol::Ext::SYNC provides the following symbolic constants:
ValueType => [ 'Absolute', 'Relative' ] TestType => [ 'PositiveTransition', 'NegativeTransition', 'PositiveCommparison', 'NegativeComparison' ] AlarmState => [ 'Active', 'Inactive', 'Destroyed' ]
X11::Protocol::Ext::SYNC provides the folowing bad resource errors: Counter, Alarm, Fence.
Counter
Alarm
Fence
X11::Protocol::Ext::SYNC provides the following requests:
$X->XsyncInitialize($major,$minor) => ($major,$minor)
$X->ListSystemCounters() => ( [ $counter,$resolution_hi,$resolution_lo ], ... )
$X->CreateCounter($id,($initial_value_hi,$initial_value_lo))
$X->SetCounter($counter,($value_hi,$value_lo))
$X->ChangeCounter($counter,($amount_hi,$amount_lo))
$X->DestroyCounter($counter) => ($counter_hi,$counter_lo)
$X->Await([$trigger,($thresh_hi,$thresh_lo)], ...)
$X->CreateAlarm($id, counter=>$counter, value_type=>$value_type, value=>[$value_hi,$value_lo], test_type=>$test_type, delta=>[$delta_hi,$delta_lo], events=>$events)
$X->ChangeAlarm($id, counter=>$counter, value_type=>$value_type, value=>[$value_hi,$value_lo], test_type=>$test_type, delta=>[$delta_hi,$delta_lo], events=>$events)
$X->QueryAlarm($alarm) => ($trigger,($delta_hi,$delta_lo),$events,$state)
$X->DestroyAlarm($alarm)
$X->SetPriority($id,$priority)
$X->GetPriority($id) => ($priority)
$X->CreateFence($drawable,$id,$initially_triggered)
$X->TriggerFence($id)
$X->ResetFence($id)
$X->DestroyFence($id)
$X->QueryFence($id) => ($triggered)
$X->AwaitFence(@ids)
X11::Protocol::Ext::SYNC provides the following events:
CounterNotify => { counter=>$counter, wait_value=>[$wait_value_hi,$wait_value_lo], counter_value=>[$counter_value_hi,$counter_value_lo], time=>$time, count=>$count, destroyed=>'True'|'False' }
AlarmNotify => { alarm=>$alarm, counter_value=>[$counter_value_hi,$counter_value_lo], alarm_value=>[$alarm_value_hi,$alarm_value_lo], time=>$time, state=>$state} # 'AlarmState'
Probably lots: this module has not been thoroughly tested. At least it loads and initializes on server supporting the correct version.
Brian Bidulock <bidulock@openss7.org>
perl(1), X11::Protocol(3pm), X Synchronization Extension Protocol.
To install X11::Protocol::Enhanced, copy and paste the appropriate command in to your terminal.
cpanm
cpanm X11::Protocol::Enhanced
CPAN shell
perl -MCPAN -e shell install X11::Protocol::Enhanced
For more information on module installation, please visit the detailed CPAN module installation guide.