chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

Java反射機(jī)制到底是什么?有什么作用

Wildesbeast ? 來源:今日頭條 ? 作者:程序猿的內(nèi)心獨(dú)白 ? 2020-02-15 14:07 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

什么是Java反射機(jī)制?

Java反射機(jī)制是 Java 語言的一個(gè)重要特性,它在服務(wù)器程序和中間件程序中得到了廣泛運(yùn)用。在服務(wù)器端,往往需要根據(jù)客戶的請(qǐng)求,動(dòng)態(tài)調(diào)用某一個(gè)對(duì)象的特定方法。此外,在 ORM 中間件的實(shí)現(xiàn)中,運(yùn)用 Java 反射機(jī)制可以讀取任意一個(gè) JavaBean 的所有屬性,或者給這些屬性賦值

通過反射機(jī)制,可以在運(yùn)行的時(shí)候訪問到對(duì)象的屬性、方法、構(gòu)造方法等等

哪些地方用到反射機(jī)制?

其實(shí)我們都用過反射機(jī)制,只是并不知道它是反射機(jī)制而已。比如我們使用JDBC連接數(shù)據(jù)庫的時(shí)候(Class.forName() 這個(gè)相信大家都用過),只是當(dāng)時(shí)并沒有在意那么多(心里想能用就行,管它呢),使用到反射機(jī)制的框架有(Spring、SpringMVC、Mybatis、Hibernate、Structs)

反射機(jī)制提供了哪些功能?

在運(yùn)行時(shí)判定任意一個(gè)對(duì)象所屬的類

在運(yùn)行時(shí)構(gòu)造任意一個(gè)類的對(duì)象

在運(yùn)行時(shí)判定任意一個(gè)類所具有的成員變量和方法

在運(yùn)行時(shí)調(diào)用任意一個(gè)對(duì)象的方法

生成動(dòng)態(tài)代理

如何實(shí)現(xiàn)反射機(jī)制?

先來個(gè)實(shí)體類 Student

/**

* @author Woo_home

* @create by 2019/12/10

*/

public class Student {

private int id;

private String name;

public Student(){}

public int getId() {

return id;

}

public void setId(int id) {

this.id = id;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

@Override

public String toString() {

return "Student{" +

"id=" + id +

", name='" + name + ''' +

'}';

}

}

反射的三種實(shí)現(xiàn)方式

一、通過對(duì)象的getClass()方法

getClass()方法是Object類的方法,因?yàn)樗蓄惗祭^承自O(shè)bject類,所以可以直接使用getClass()方法

public class ReflectDemo {

public static void main(String[] args) {

Student student = new Student();

Class studentClass = student.getClass();

System.out.println(studentClass);

}

}

二、通過類的.class屬性

直接獲取一個(gè)類的class

public class ReflectDemo {

public static void main(String[] args) {

Class studentClass = Student.class;

System.out.println(studentClass);

}

}

三、通過Class類的forName()方法(常用)

Class.forName() 是一個(gè)靜態(tài)方法

public class ReflectDemo {

public static void main(String[] args) {

// 使用 try、catch 處理異常

try {

Class studentClass = Class.forName("com.example.app.demo.Student");

System.out.println(studentClass);

}catch (ClassNotFoundException e){

e.printStackTrace();

}

}

}

public class ReflectDemo {

// 使用 throws 處理異常

public static void main(String[] args) throws ClassNotFoundException{

Class studentClass = Class.forName("com.example.app.demo.Student");

System.out.println(studentClass);

}

}

三種方法打印的結(jié)果都是一樣的,如下圖所示

注意: 這里的Class.forName()方法需要使用try、catch語句括住或者在方法或類中拋出ClassNotFoundException 異常,不然會(huì)報(bào)錯(cuò)

有些人就問了,為什么需要使用try、catch語句括住呢,來看下forName方法源碼:

可以看到forName需要拋出一個(gè) ClassNotFoundException 異常,自然而然地你使用forName()方法也自然要拋出 / 處理日常了

@CallerSensitive

public static Class forName(String className)

throws ClassNotFoundException {

Class caller = Reflection.getCallerClass();

return forName0(className, true, ClassLoader.getClassLoader(caller), caller);

}

判斷一個(gè)類是否為某個(gè)類的實(shí)例

1、instanceof

public class ReflectDemo {

public static void main(String[] args) {

HashMap map = new HashMap<>();

if (map instanceof Map){

System.out.println("HashMap is Map instance");

}

}

}

輸出:HashMap is Map instance

2、isInstance

public class ReflectDemo {

public static void main(String[] args) {

HashMap map = new HashMap<>();

if (Map.class.isInstance(map)){

System.out.println("HashMap is Map Instance");

}

}

}

輸出:HashMap is Map Instance

利用反射創(chuàng)建對(duì)象實(shí)例

1、通過Class對(duì)象的 newInstance() 方法

public class ReflectDemo {

public static void main(String[] args) throws IllegalAccessException, InstantiationException {

// 這里的Student是使用上面一開始的Student類

Class studentClass = Student.class;

// 使用newInstance創(chuàng)建實(shí)例

Student student = (Student)studentClass.newInstance();

student.setId(1);

student.setName("John");

System.out.println(student);

}

}

輸出:John

2、通過Constructor對(duì)象的 getConstructor() 方法

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {

Class classes = List.class;

Constructor constructor = classes.getConstructor(List.class);

List result = (List) constructor.newInstance("John");

System.out.println(result);

}

}

輸出:John

Field

根據(jù)字段名獲取字段(只能獲取public的)

public class ReflectDemo {

public static void main(String[] args) throws NoSuchFieldException {

Class classes = Student.class;

Field id = classes.getField("id");

Field name = classes.getField("name");

System.out.println(id);

System.out.println(name);

}

}

class Student{

public int id;

public String name;

}

輸出:

以下為輸出結(jié)果

public int com.example.app.demo.Student.id

public java.lang.String com.example.app.demo.Student.name

如果獲取的字段是被private修飾的,那么將會(huì)拋出 NoSuchFieldException 異常

以下為輸出結(jié)果

Exception in thread “main” java.lang.NoSuchFieldException: id

at java.lang.Class.getField(Class.java:1703)

at com.example.app.demo.ReflectDemo.main(ReflectDemo.java:12)

為什么會(huì)這樣呢?我們朝著這個(gè)問題看下源碼是怎么實(shí)現(xiàn)的

getField(String name)

根據(jù)名稱獲取公有的(public)類成員

@CallerSensitive

public Field getField(String name)

throws NoSuchFieldException, SecurityException {

checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);

// 可以看到在getField傳入的name實(shí)際是調(diào)用getField0來實(shí)現(xiàn)的

Field field = getField0(name);

if (field == null) {

throw new NoSuchFieldException(name);

}

return field;

}

getField0(String name)

而getField0主要判斷依據(jù)是searchFields,searchFields根據(jù)privateGetDeclaredFields判斷

private Field getField0(String name) throws NoSuchFieldException {

Field res;

// Search declared public fields

if ((res = searchFields(privateGetDeclaredFields(true), name)) != null) {

return res;

}

// 省略部分代碼...

return null;

}

privateGetDeclaredFields(boolean publicOnly)

可以看到當(dāng)privateGetDeclaredFields傳入的值是true的時(shí)候表示使用的是 declaredPublicFields ,也就是說是public聲明的字段,當(dāng)傳入的值為false的時(shí)候使用的是 declaredFields(所有聲明字段)

private Field[] privateGetDeclaredFields(boolean publicOnly) {

checkInitted();

Field[] res;

ReflectionData rd = reflectionData();

if (rd != null) {

// 判斷輸入的布爾值是true還是false

res = publicOnly ? rd.declaredPublicFields : rd.declaredFields;

if (res != null) return res;

}

// 省略部分代碼...

return res;

}

getFields(String name)

獲取所有 public 修飾的字段

public class ReflectDemo {

public static void main(String[] args) throws NoSuchFieldException {

Class classes = Student.class;

Field[] allField = classes.getFields();

for (Field field : allField) {

System.out.println(field);

}

}

}

class Student{

private int id;

public String name;

}

輸出:

以下為輸出結(jié)果

public java.lang.String com.example.app.demo.Student.name

可以看到我們的Student類中聲明了一個(gè)private修飾的id和一個(gè)public修飾的name,根據(jù)輸出結(jié)果可以知道getFields()方法只能獲取public修飾的字段

看下實(shí)現(xiàn)源碼:

在getFields中返回了一個(gè)copyFields方法,該方法中調(diào)用了 privateGetPublicFields 方法

@CallerSensitive

public Field[] getFields() throws SecurityException {

checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);

return copyFields(privateGetPublicFields(null));

}

來看下privateGetPublicFields方法可以知道在該方法中調(diào)用了 privateGetDeclaredFields(true) 這個(gè)方法,關(guān)于這個(gè)方法上面已經(jīng)講述過

private Field[] privateGetPublicFields(Set> traversedInterfaces) {

// Local fields

Field[] tmp = privateGetDeclaredFields(true);

addAll(fields, tmp);

// 省略部分代碼...

return res;

}

getDeclaredField(String name)

根據(jù)名稱獲取已聲明的類成員。但不能得到其父類的類成員

public class ReflectDemo {

public static void main(String[] args) throws NoSuchFieldException {

Class classes = Student.class;

Field allField = classes.getDeclaredField("name");

System.out.println(allField);

}

}

class Student{

private int id;

private String name;

}

Class Student{

public int id;

public String name;

}

輸出:可以看到getDeclaredField()方法即可以獲取public類型的字段也能獲取private類型的字段

以下為輸出結(jié)果:

private java.lang.String com.example.app.demo.Student.name

public java.lang.String com.example.app.demo.Student.name

來看下源碼的原理

@CallerSensitive

public Field getDeclaredField(String name)

throws NoSuchFieldException, SecurityException {

checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);

Field field = searchFields(privateGetDeclaredFields(false), name);

if (field == null) {

throw new NoSuchFieldException(name);

}

return field;

}

可以看到 getDeclaredField() 方法調(diào)用的也是 privateGetDeclaredFields 方法,上面已經(jīng)講述過

getDeclaredFields()

獲取所有已聲明的類成員變量

public class ReflectDemo {

public static void main(String[] args) {

Class classes = Student.class;

Field[] allField = classes.getDeclaredFields();

for (Field field : allField) {

System.out.println(field);

}

}

}

class Student{

public int id;

public String name;

}

輸出:

以下為輸出結(jié)果:

public int com.example.app.demo.Student.id

public java.lang.String com.example.app.demo.Student.name

而且 getDeclaredFields 還可以獲取private修飾的字段

public class ReflectDemo {

public static void main(String[] args) {

Class classes = Student.class;

Field[] allField = classes.getDeclaredFields();

for (Field field : allField) {

System.out.println(field);

}

}

}

class Student{

private int id;

private String name;

}

輸出:

以下為輸出結(jié)果:

private int com.example.app.demo.Student.id

private java.lang.String com.example.app.demo.Student.name

來看下源碼 getDeclaredFields() 方法的源碼

可以看到 getDeclaredFields() 方法中也是調(diào)用 privateGetDeclaredFields 方法的,并且這里的 privateGetDeclaredFields傳入的值是 false ,也就是獲取所有已聲明的字段

@CallerSensitive

public Field[] getDeclaredFields() throws SecurityException {

checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);

return copyFields(privateGetDeclaredFields(false));

}

Method

getMethod(String name)

返回類或接口的特定方法。其中第一個(gè)參數(shù)為方法名稱,后面的參數(shù)為方法參數(shù)對(duì)應(yīng) Class 的對(duì)象的方法名

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException {

// 傳入CaseMethod的方法名

Method methods = CaseMethod.class.getMethod("caseOfMethod");

System.out.println(methods);

}

}

class CaseMethod{

public void caseOfMethod(){

System.out.println("case");

}

}

輸出:

以下為輸出結(jié)果:

public void com.example.app.demo.CaseMethod.caseOfMethod()

getMethods()

獲取類或接口的所有 public 方法,包括其父類的 public 方法

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException {

// 獲取所有方法,使用Method數(shù)組接收

Method[] methods = CaseMethod.class.getMethods();

for (Method method : methods) {

System.out.println(method);

}

}

}

class CaseMethod{

public void caseOfMethod(){

System.out.println("case");

}

}

輸出:

可以看到輸出結(jié)果中第一個(gè)就是我們自定義的CaseMethod中的方法,其余的都是Object類的方法

以下為輸出結(jié)果:

public void com.example.app.demo.CaseMethod.caseOfMethod()

public final void java.lang.Object.wait() throws java.lang.InterruptedException

public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException

public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException

public boolean java.lang.Object.equals(java.lang.Object)

public java.lang.String java.lang.Object.toString()

public native int java.lang.Object.hashCode()

public final native java.lang.Class java.lang.Object.getClass()

public final native void java.lang.Object.notify()

public final native void java.lang.Object.notifyAll()

getDeclaredMethod(String name, Class… parameterTypes)

獲取類或接口的特定聲明方法。其中第一個(gè)參數(shù)為方法名稱,后面的參數(shù)為方法參數(shù)對(duì)應(yīng) Class 的對(duì)象

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException {

Method methods = CaseMethod.class.getDeclaredMethod("caseOfMethod",null);

System.out.println(methods);

}

}

class CaseMethod{

public void caseOfMethod(){

System.out.println("case");

}

private void caseOf(){

System.out.println("case1");

}

}

getDeclaredMethods()

獲取類或接口聲明的所有方法,包括 public、protected、默認(rèn)(包)訪問和 private 方法,但不包括繼承的方法

public class ReflectDemo {

public static void main(String[] args) {

Method[] methods = CaseMethod.class.getDeclaredMethods();

for (Method method : methods) {

System.out.println(method);

}

}

}

class CaseMethod{

public void caseOfMethod(){

System.out.println("case");

}

private void caseOf(){

System.out.println("case1");

}

}

輸出:

以下為輸出結(jié)果:

public void com.example.app.demo.CaseMethod.caseOfMethod()

private void com.example.app.demo.CaseMethod.caseOf()

使用invoke方法

當(dāng)獲取一個(gè)對(duì)象之后就可以使用invoke方法,invoke方法示例如下:

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {

Method methods = CaseMethod.class.getMethod("caseOfMethod");

CaseMethod caseMethod = new CaseMethod();

methods.invoke(caseMethod);

}

}

class CaseMethod{

public void caseOfMethod(){

System.out.println("case");

}

private void caseOf(){

System.out.println("case1");

}

}

輸出:case

那么invoke是如何實(shí)現(xiàn)的呢?來看下源碼

boolean override;

@CallerSensitive

public Object invoke(Object obj, Object... args)

throws IllegalAccessException, IllegalArgumentException,

InvocationTargetException

{

// 判斷override是否為true

if (!override) {

// 判斷modifiers(方法的修飾符)是否為public

if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {

// 通過方法的修飾符(protected、private、)或聲明類(如子類可以訪問父類的protected方法)與caller之間的關(guān)系

Class caller = Reflection.getCallerClass();

// 判斷caller是否有權(quán)限方法該方法

checkAccess(caller, clazz, obj, modifiers);

}

}

MethodAccessor ma = methodAccessor; // read volatile

if (ma == null) {

ma = acquireMethodAccessor();

}

return ma.invoke(obj, args);

}

注意: invoke方法如果提供了錯(cuò)誤的參數(shù),會(huì)拋出一個(gè)異常,所以要提供一個(gè)異常處理器。建議在有必要的時(shí)候才使用invoke方法,有如下原因:

1、invoke方法的參數(shù)和返回值必須是Object類型,意味著必須進(jìn)行多次類型轉(zhuǎn)換

2、通過反射調(diào)用方法比直接調(diào)用方法要明顯慢一些

Constructor

getConstructor(Class… parameterTypes)

獲取類的特定 public 構(gòu)造方法。參數(shù)為方法參數(shù)對(duì)應(yīng) Class 的對(duì)象

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {

Constructor constructor = CaseMethod.class.getConstructor(int.class, String.class);

System.out.println(constructor);

}

}

class CaseMethod{

private int id;

private String name;

private int cap;

public CaseMethod(int id,String name){

this.id = id;

this.name = name;

}

public CaseMethod(int cap){

}

}

輸出:

以下為輸出結(jié)果:

public com.example.app.demo.CaseMethod(int,java.lang.String)

getConstructors()

獲取類的所有 public 構(gòu)造方法

public class ReflectDemo {

public static void main(String[] args) {

Constructor[] constructors = CaseMethod.class.getConstructors();

for (Constructor constructor : constructors) {

System.out.println(constructor);

}

}

}

class CaseMethod{

private int id;

private String name;

private int cap;

public CaseMethod(int id,String name){

this.id = id;

this.name = name;

}

public CaseMethod(int cap){

}

}

輸出:

以下為輸出結(jié)果:

public com.example.app.demo.CaseMethod(int,java.lang.String)

public com.example.app.demo.CaseMethod(int)

getDeclaredConstructor(Class… parameterTypes)

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException {

// 注意:由于private修飾的CaseMethod構(gòu)造函數(shù)沒有參數(shù),所以getDeclaredConstructor()可以為空

// 默認(rèn)的getDeclaredConstructor(Class... parameterTypes)方法是要傳參數(shù)類型的

Constructor constructor = CaseMethod.class.getDeclaredConstructor();

Constructor declaredConstructor = CaseMethod.class.getDeclaredConstructor(int.class, String.class);

System.out.println(constructor);

System.out.println(declaredConstructor);

}

}

class CaseMethod{

private int id;

private String name;

private int cap;

private CaseMethod(){

}

public CaseMethod(int id,String name){

this.id = id;

this.name = name;

}

}

輸出:

以下為輸出結(jié)果:

private com.example.app.demo.CaseMethod()

public com.example.app.demo.CaseMethod(int,java.lang.String)

getDeclaredConstructors()

獲取類的所有構(gòu)造方法

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException {

Constructor[] constructors = CaseMethod.class.getDeclaredConstructors();

for (Constructor constructor : constructors) {

System.out.println(constructor);

}

}

}

class CaseMethod{

private int id;

private String name;

private int cap;

private CaseMethod(){

}

public CaseMethod(int id,String name){

this.id = id;

this.name = name;

}

}

輸出:

以下為輸出結(jié)果:

private com.example.app.demo.CaseMethod()

public com.example.app.demo.CaseMethod(int,java.lang.String)

使用newInstance創(chuàng)建實(shí)例

public class ReflectDemo {

public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {

Constructor constructor = CaseMethod.class.getConstructor(String.class);

CaseMethod caseMethod = constructor.newInstance("Lisa");

System.out.println(caseMethod);

}

}

class CaseMethod{

private String name;

public CaseMethod(String name){

this.name = name;

}

@Override

public String toString() {

return "CaseMethod{" +

"name='" + name + ''' +

'}';

}

}

輸出:

CaseMethod{name=‘Lisa’}

總結(jié)

Java獲得Class對(duì)象的引用的方法中,Class.forName() 方法會(huì)自動(dòng)初始化Class對(duì)象,而 .class 方法不會(huì),.class 的初始化被延遲到靜態(tài)方法或非常數(shù)靜態(tài)域的首次引用

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 服務(wù)器
    +關(guān)注

    關(guān)注

    13

    文章

    10000

    瀏覽量

    90121
  • JAVA
    +關(guān)注

    關(guān)注

    20

    文章

    2992

    瀏覽量

    114806
  • 數(shù)據(jù)庫
    +關(guān)注

    關(guān)注

    7

    文章

    3979

    瀏覽量

    67424
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    IEC 到底是什么?為什么它能影響全球?

    IEC 到底是什么?為什么它能影響全球?
    的頭像 發(fā)表于 09-04 17:07 ?1496次閱讀

    晶振的 “負(fù)載電容” 到底是什么

    負(fù)載電容,到底是什么? 負(fù)載電容,簡(jiǎn)單來說,是指晶振的兩條引線連接IC塊內(nèi)部及外部所有有效電容之和,我們可以將其看作晶振片在電路中串接的電容。從更專業(yè)的角度講,它是為了使晶振能夠在其標(biāo)稱頻率下穩(wěn)定
    的頭像 發(fā)表于 07-25 16:26 ?458次閱讀

    請(qǐng)問編譯純r(jià)tos到底是選擇Linux+rtos的sdk編譯only rtos還是直接使用rtos sdk?

    編譯純r(jià)tos到底是選擇Linux+rtos的sdk編譯only rtos還是直接使用rtos sdk?
    發(fā)表于 07-11 07:22

    一文給你講透!DA板卡到底是什么?它和主板又有哪些不同?

    大家好,我是老王,在電子行業(yè)干了十幾年,今天我就用“大白話”給大家講講DA板卡到底是啥,它和咱們常說的“主板”啥區(qū)別。文章里會(huì)穿插一些表格和實(shí)際案例,保證你讀完不僅能懂,還能跟朋友吹牛!
    的頭像 發(fā)表于 04-24 16:48 ?1354次閱讀
    一文給你講透!DA板卡<b class='flag-5'>到底是</b>什么?它和主板又有哪些不同?

    Java的SPI機(jī)制詳解

    作者:京東物流 楊葦葦 1.SPI簡(jiǎn)介 SPI(Service Provicer Interface)是Java語言提供的一種接口發(fā)現(xiàn)機(jī)制,用來實(shí)現(xiàn)接口和接口實(shí)現(xiàn)的解耦。簡(jiǎn)單來說,就是系統(tǒng)只需要定義
    的頭像 發(fā)表于 03-05 11:35 ?990次閱讀
    <b class='flag-5'>Java</b>的SPI<b class='flag-5'>機(jī)制</b>詳解

    ADS1298 RDATAC Opcode時(shí),START到底是低還是高?

    您好,1298的datasheet看到這有點(diǎn)糊涂了。 1、RDATAC Opcode時(shí),START到底是低還是高? 從時(shí)序圖上看實(shí)線是高、虛線是低,請(qǐng)問實(shí)線虛線什么區(qū)別? 2、同時(shí)在DOUT
    發(fā)表于 02-14 07:48

    ADS1298 tdr的值到底是多大,跟采樣率等有沒有什么關(guān)系?

    我想請(qǐng)問一下, 1、tdr的值到底是多大,跟采樣率等有沒有什么關(guān)系。數(shù)據(jù)手冊(cè)上只找到建立時(shí)間,好像沒有這個(gè)時(shí)間的值,28頁那個(gè)最小SCLK時(shí)鐘為110khz是怎么計(jì)算的。 2、 tdr到底是
    發(fā)表于 02-13 06:11

    ADS1298的操作溫度范圍到底是多少?

    ADS1298是 0°Cto +70°C;工業(yè)級(jí)ADS1298I 是 –40°Cto +85°C。 現(xiàn)在不知道ADS1298的操作溫度范圍到底是多少?
    發(fā)表于 02-10 07:19

    ADS1298ECG-FE原理圖上看見很多NI的符號(hào), 到底是什么意思呢?

    我們?cè)贏DS1298ECG-FE原理圖上看見很多NI的符號(hào), 到底是什么意思呢? 具體的值是多少呢? 如下面兩個(gè)圖所示: R1, R2電阻的值是多少? 這個(gè)比較重要。 R59 - R66又是多少? 麻煩你們回答一下。 謝謝
    發(fā)表于 02-05 08:16

    ADS1278的參考電壓的要求到底是怎樣的?

    <27MHz為例,Vrefp輸入范圍為0.5到3.1V 而后文又提到,參考輸入電壓的范圍為AGND-0.4v to AVDD+0.4v 問題1. 這個(gè)參考電壓的要求到底是怎樣的? 問題2.
    發(fā)表于 01-23 08:02

    ADS7864采樣頻率到底是由外部時(shí)鐘決定還是HOLDX信號(hào)頻率決定?

    ADS7864數(shù)據(jù)手冊(cè)上說當(dāng)采用8M外部時(shí)鐘的時(shí)候,采樣頻率為500kHz,但是有人說可以通過HOLDX頻率來控制采樣頻率,一個(gè)HOLDX下降沿采樣一次,HOLDX頻率就是采樣頻率。請(qǐng)問采樣頻率到底是由外部時(shí)鐘決定還是HOLDX信號(hào)頻率決定?
    發(fā)表于 01-14 06:47

    LM629 PID參數(shù)調(diào)節(jié),所謂的高頻震蕩到底是什么意思?

    為何我的系統(tǒng)一直沒有所謂的高頻震蕩這種現(xiàn)象;只是隨著Kd的增加,系統(tǒng)的阻尼開始變大而已。所謂的高頻震蕩到底是什么意思?
    發(fā)表于 01-01 07:30

    反射內(nèi)存卡在實(shí)時(shí)系統(tǒng)中的作用

    天津拓航科技反射內(nèi)存卡在實(shí)時(shí)系統(tǒng)中的重要作用
    的頭像 發(fā)表于 11-14 09:59 ?1479次閱讀
    <b class='flag-5'>反射</b>內(nèi)存卡在實(shí)時(shí)系統(tǒng)中的<b class='flag-5'>作用</b>

    TLV320AIC3254內(nèi)部中的ADC處理模塊和minidsp到底是什么關(guān)系?

    我想請(qǐng)問一下幾個(gè)問題: 1.3254內(nèi)部中的ADC處理模塊和minidsp到底是什么關(guān)系,是并列的還是串行關(guān)系?還是ADC處理模塊就是minidsp特殊情況下的部分? 2.minidsp的抽取因子該怎么理解,到底怎么使用?
    發(fā)表于 10-31 06:02

    請(qǐng)問TPA3130D2的芯片絲印到底是PTPA3130還是TPA3130呀?

    TPA3130D2的芯片絲印到底是PTPA3130還是TPA3130呀
    發(fā)表于 10-23 06:13