You can write anything you want, so long as both the userspace and driver both agree on what the protocol is supposed to be.
Eg
The driver parses out Time= and message=Code:char buff[100]; sprintf(buff,"Time=%d,message=%s", 1234, "hello" ); write( fd, buff, strlen(buff)+1 );
Or for more compactness, you can represent Time and message as opcodes, like say
sprintf(buff,"1=%d,2=%s", 1234, "hello" );
More compact, but harder to write the user manual for it perhaps.