Warning: Can't synchronize with repository "(default)" (No changeset 96d22ec3fa3ef6de3ea8dc0d7d398adc9aa071cf in the repository). Look in the Trac log for more information.

Ticket #360 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

[oeventsd] Trigger for ResourceStateChanged

Reported by: spaetz Owned by: jluebbe
Priority: minor Milestone:
Component: framework/oeventsd Version:
Keywords: Cc:

Description

I want to disable suspend when I use GPS. Mickey told me to use rules for it. So basically what I want is a trigger that enables me to do that:

trigger: ResourceStateChange('GPS')
filter:  attribute_is(state,'True') 
action:  OccupyResource('CPU')

trigger: ResourceStateChange('GPS')
filter:  attribute_is(state,'False') 
action:  ReleaseResource('CPU')

or even

while:   ResourceStateTrue('GPS')
action:  OccupyResource('CPU')

I am a yaml noobie, so the syntax may be wrong but you get the gist.

Change History

comment:1 Changed 4 years ago by daniel

Sounds good, there already is a generic DBusTrigger which can be used for that. See http://totalueberwachung.de/blog/2008/10/21/fso-tutorial-dbus-rules for an example of how to use DBusTrigger.

Note: See TracTickets for help on using tickets.