Click here to Skip to main content
15,891,951 members
Home / Discussions / C#
   

C#

 
AnswerRe: ms access afterupdate event in c# textbox Pin
JOAT-MON2-Jul-11 3:12
JOAT-MON2-Jul-11 3:12 
AnswerRe: ms access afterupdate event in c# textbox Pin
JOAT-MON2-Jul-11 3:26
JOAT-MON2-Jul-11 3:26 
QuestionFile Type forensic identification Pin
devvvy1-Jul-11 14:20
devvvy1-Jul-11 14:20 
AnswerRe: File Type forensic identification Pin
Philippe Mori1-Jul-11 14:58
Philippe Mori1-Jul-11 14:58 
AnswerRe: File Type forensic identification Pin
PIEBALDconsult1-Jul-11 18:51
mvePIEBALDconsult1-Jul-11 18:51 
QuestionImplementing a list of abstract objects... Pin
faheemnadeem1-Jul-11 10:15
faheemnadeem1-Jul-11 10:15 
AnswerRe: Implementing a list of abstract objects... Pin
Philippe Mori1-Jul-11 11:37
Philippe Mori1-Jul-11 11:37 
GeneralRe: Implementing a list of abstract objects... Pin
faheemnadeem1-Jul-11 13:52
faheemnadeem1-Jul-11 13:52 
hi, thanks for the reply...
The problem is i need to implement the properties related to the channels in the inherited utility class.

e.g. if i try your approach... which i already did...

i made another abstract class and moved all the channel related properties to that class. e.g.

public abstract class Channel
    {
        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(false)]
        [DescriptionAttribute("If set to True, the oscilloscope acquires a waveform for the channel.  If set to False, the oscilloscope does not acquire a waveform for the channel")]
        public abstract bool ChannelEnabled { get; set; }

        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(false)]
        [DescriptionAttribute("Specifies whether channel is inverted or not")]
        public abstract bool ChannelInverted { get; set; }

        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(0)]
        [DescriptionAttribute("Returns the physical repeated capability identifier defined by the specific driver for the channel that corresponds to the one-based index that the user specifies.  If the driver defines a qualified channel name, this property returns the qualified name")]
        public abstract double ChannelName { get; }

        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(0)]
        [DescriptionAttribute("Specifies the input impedance for the channel in Ohms. Common values are 50.0, 75.0, and 1,000,000.0")]
        public abstract double InputImpedance { get; set; }

        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(0)]
        [DescriptionAttribute("Specifies the maximum frequency for the input signal you want the instrument to accommodate without attenuating it by more than 3dB")]
        public abstract double MaximumInputFrequency { get; set; }

        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(0)]
        [DescriptionAttribute("Specifies the scaling factor by which the probe the end-user attaches to the channel attenuates the input.  For example, for a 10:1 probe, the end-user sets this attribute to 10.0")]
        public abstract double ProbeAttenuation { get; set; }

        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(0)]
        [DescriptionAttribute("Specifies how the oscilloscope couples the input signal for the channel")]
        public abstract VerticalCoupling VerticalCoupling { get; set; }

        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(0)]
        [DescriptionAttribute("Specifies the location of the center of the range that the Vertical Range attribute specifies. The value is with respect to ground and is in volts")]
        public abstract double VerticalOffset { get; set; }

        [Category("IviScopeBase Capability Group")]
        [DefaultValueAttribute(0)]
        [DescriptionAttribute("Specifies the absolute value of the full-scale input range for a channel. The units are volts")]
        public abstract double VerticalRange { get; set; }

        [Category("IviScopeProbeAutoSense Extension Group")]
        [DefaultValueAttribute(false)]
        [DescriptionAttribute("If this attribute is True, the driver configures the oscilloscope to sense the attenuation of the probe automatically. If this attribute is False, the driver disables the automatic probe sense and configures the oscilloscope to use the value of the Probe Attenuation attribute")]
        public abstract bool ProbeAttenuationAuto { get; set; }
    }


Then i added an abstract list of channels to the VisaOscilloscope class as mentioned before.e.g.

public abstract List<Channel> Channels { get; set; }


Then i implemented the list in the utility class inheriting from "VisaOscilloscope" like this:

public override List<Channel> Channels
{
    get
    {
        throw new NotImplementedException();
    }
    set
    {
        throw new NotImplementedException();
    }
}


Can you please clarify as i declared all the properties in channel class abstract as well they need to be implemented as well. So where they are implemented. if i compile the above code i get no compilation errors.

What my other classes outside this hierarchy intend to do is:

VisaOscilloscope myScope = new VisaOscilloscope();
myScope.channels[0].Enabled = true;


How do i implement the properties of the channel object, as i have implemented base abstract properties in Visaoscilloscope in the utility classes inheriting from visaOscilloscope.

Will be really thankful if u can answer this.


Thanks for the help so far...
GeneralRe: Implementing a list of abstract objects... Pin
Philippe Mori1-Jul-11 15:16
Philippe Mori1-Jul-11 15:16 
GeneralRe: Implementing a list of abstract objects... Pin
faheemnadeem1-Jul-11 15:41
faheemnadeem1-Jul-11 15:41 
GeneralRe: Implementing a list of abstract objects... Pin
Philippe Mori1-Jul-11 16:30
Philippe Mori1-Jul-11 16:30 
GeneralRe: Implementing a list of abstract objects... Pin
faheemnadeem1-Jul-11 18:09
faheemnadeem1-Jul-11 18:09 
GeneralRe: Implementing a list of abstract objects... Pin
Philippe Mori2-Jul-11 3:30
Philippe Mori2-Jul-11 3:30 
GeneralRe: Implementing a list of abstract objects... Pin
faheemnadeem2-Jul-11 4:08
faheemnadeem2-Jul-11 4:08 
QuestionC# to MATLAB connectivity in windows 7 Pin
Sa na1-Jul-11 9:03
Sa na1-Jul-11 9:03 
AnswerRe: C# to MATLAB connectivity in windows 7 Pin
Dave Kreskowiak1-Jul-11 11:10
mveDave Kreskowiak1-Jul-11 11:10 
GeneralRe: C# to MATLAB connectivity in windows 7 Pin
Sa na2-Jul-11 1:13
Sa na2-Jul-11 1:13 
GeneralRe: C# to MATLAB connectivity in windows 7 Pin
Sa na2-Jul-11 2:52
Sa na2-Jul-11 2:52 
QuestionIs file mapping supported in microsoft .net framework Pin
Danzy831-Jul-11 5:26
Danzy831-Jul-11 5:26 
AnswerRe: Is file mapping supported in microsoft .net framework Pin
Ennis Ray Lynch, Jr.1-Jul-11 6:06
Ennis Ray Lynch, Jr.1-Jul-11 6:06 
QuestionHow do I monitor bytes per second written or read from a directory (and sub-directories)? Pin
bbranded1-Jul-11 5:16
bbranded1-Jul-11 5:16 
AnswerRe: How do I monitor bytes per second written or read from a directory (and sub-directories)? Pin
Dave Kreskowiak1-Jul-11 7:14
mveDave Kreskowiak1-Jul-11 7:14 
GeneralRe: How do I monitor bytes per second written or read from a directory (and sub-directories)? Pin
bbranded1-Jul-11 9:10
bbranded1-Jul-11 9:10 
GeneralRe: How do I monitor bytes per second written or read from a directory (and sub-directories)? Pin
Dave Kreskowiak1-Jul-11 11:07
mveDave Kreskowiak1-Jul-11 11:07 
Questionquestion Pin
ivan_go1-Jul-11 1:57
ivan_go1-Jul-11 1:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.