Declaring an emergency

No, not implemented.
I was running out of fuel because of heavy nosewind and decided to divert. Just added the new flightplan, requested IFR and flown to my alternate. On regular engine shutdown I was only minutes away from low fuel shutdown.