-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ddca_get_any_vcp_value_using_implicit_type() incorrect order of arguments passed to ddca_get_any_vcp_value_using_explicit_type() #350
Comments
@digitaltrails I apologize for having caused you to spend time diagnosing this trivial bug. As you can see, this function was never really tested. As a practical matter, you can ignore Table type features and use only the simpler ddca_get_non_table_vcp_value() and ddca_set_non_table_vcp_value(). Support for Table type features was implemented based on the DDC/CI spec, before I grasped that there few (as in I've never seen one) monitors that implement the Table type features defined in MCCS 3.0. Monitor makers instead moved on to MCCS 2.2, which provides some of the facilities of 3.0, but in a way that doesn't require Table type. |
It was a good learning exercise concerning libddcutil. It was heaps easier than trying to figure out the GDBUS library. My C is a bit rusty (I did more than a decade of C coding, but that was mostly prior to 2000). I think I'm on the right track now with both libraries (except for memory allocation in GDBUS). I've got detect/get/set working and can test via D-Feet. I was wondering about the table features. I'd actually coded get/set with them included, but then I couldn't find an example of a table. I've no idea where I'm going with this experiment. If you'd like some example C for wrapping DBUS around libddcutil, that could be one possible use. I may continue to the point where I can use dbus from python and experiment with that in vdu_controls, but that might be quite a bit of work. |
Hi Michael, I'm very interested in what you're doing. Making libddcutil a service is, I think, a natural next step. Required for that is for libddcutil to handle display connection/disconnection, sleep, etc. At the last minute I pulled the API functions in this regard from release 2.0, largely based on the problems you identified. It's much simpler to add new functions in the future than handle deprecation, etc. I look forward to seeing what you've done, and if you decide to take the server beyond the proof of concept state, I would welcome either contributions to ddcutil or a standalone git project of your own. As for C, I thought I'd long since left the language behind. But it is the correct language for building a program like ddcutil that has to interact with the operating system so closely. Coming from Java and Scala, it's painfully low level. I too last did serious work in C in the mid-90's. Perhaps the most interesting thing I did was build inter-language interoperability between C and Pascal in a mainframe environment, in order to interact with a server written in Pascal. (Ok, that really dates me.) I'm also a fan of Python. It's my goto language when there's not a compelling reason to use another. In fact, Guido van Rossum spoke at a Silicon Valley lecture series I chaired in the early 2000's. |
I reverted to using the So far the whole thing is very small. The code is one C file and a makefile. I'll email you a tar before I go any further. It's easy to play with the server via the Next I will examine creating a DBUS structure based on what's returned by There was quite a lot of porting to UNIX in the 80's/90's. That often involved a change of language. In one instance I got a contract porting a mainframe PL/1 simulation to C (mainly to improve the elapsed time). I used C/yacc/lex to write a PL/1 to C translator to do a lot of the work, it still took a few years though. I quickly transitioned through C++ to Java around the end of the century. I hardly managed to do any Python coding for work. Around 98 I did write a couple of Linux Journal articles about Python in an attempt to help boost it's profile. So, yeah, I was also an early fan of the language. |
I look forward to seeing what you've created and playing with it. I'll leave the personal history to email. But I will mention one experience that solidified my appreciation of Python. During the Dot Com boom, I did consulting work for an online pharmacy. They were using Oracle, and if you've ever worked with it you know that its command line scripting is hideous. But there's a JDBC interface to Oracle, and this was a Java shop. So I created a Jython package that imported the JDBC interface. Voila, a high powered "scripting" interface to Oracle that took about a day to create. |
I've been trying to learn a bit about DBUS. I've written a small dbus server that calls libddcutil. I have implemented a
detect
and was trying to implementGetVcp
:I wasn't having much success with
GetVcp
until I traced what was happening in libddcutil.In src/libmain/api_feature_access.c,
feature_code
andcall_type
have been swapped.The text was updated successfully, but these errors were encountered: